Exception: Textus::InvalidRole

Inherits:
Error
  • Object
show all
Defined in:
lib/textus/errors.rb

Instance Attribute Summary

Attributes inherited from Error

#code

Instance Method Summary collapse

Methods inherited from Error

#details, #exit_code, #hint, #to_envelope

Constructor Details

#initialize(r, message: nil) ⇒ InvalidRole

Returns a new instance of InvalidRole.



151
152
153
154
155
156
157
158
# File 'lib/textus/errors.rb', line 151

def initialize(r, message: nil)
  super(
    "invalid_role",
    message || "role '#{r}' is not declared in any zone",
    details: { "role" => r },
    hint: message ? nil : "valid roles are declared in .textus/manifest.yaml under roles: (each with a can: list)",
  )
end