Exception: Textus::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Textus::Error
- Defined in:
- lib/textus/errors.rb
Direct Known Subclasses
BadContent, BadFrontmatter, BadRender, EtagMismatch, InvalidProjection, InvalidRole, IoError, ProposalError, PublishError, SchemaViolation, TemplateError, UnknownKey, UsageError, WriteForbidden
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
-
#hint ⇒ Object
readonly
Returns the value of attribute hint.
Instance Method Summary collapse
-
#initialize(code, message, details: {}, exit_code: 1, hint: nil) ⇒ Error
constructor
A new instance of Error.
- #to_envelope ⇒ Object
Constructor Details
#initialize(code, message, details: {}, exit_code: 1, hint: nil) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 |
# File 'lib/textus/errors.rb', line 5 def initialize(code, , details: {}, exit_code: 1, hint: nil) super() @code = code @details = details @exit_code = exit_code @hint = hint end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/textus/errors.rb', line 3 def code @code end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
3 4 5 |
# File 'lib/textus/errors.rb', line 3 def details @details end |
#exit_code ⇒ Object (readonly)
Returns the value of attribute exit_code.
3 4 5 |
# File 'lib/textus/errors.rb', line 3 def exit_code @exit_code end |
#hint ⇒ Object (readonly)
Returns the value of attribute hint.
3 4 5 |
# File 'lib/textus/errors.rb', line 3 def hint @hint end |