Exception: Textus::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Textus::Error
- Defined in:
- lib/textus/errors.rb
Direct Known Subclasses
BadContent, BadFrontmatter, BadManifest, BadRender, BuildInProgress, Contract::MissingArgs, CursorExpired, EtagMismatch, FlagRenamed, GuardFailed, InvalidProjection, InvalidRole, IoError, ProposalError, PublishError, SchemaViolation, Surfaces::MCP::ContractDrift, Surfaces::MCP::CursorExpired, Surfaces::MCP::ToolError, TemplateError, UnknownKey, UsageError, WriteForbidden
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
- #details ⇒ Object
- #exit_code ⇒ Object
- #hint ⇒ Object
-
#initialize(code, message, info: nil, details: {}, exit_code: 1, hint: nil) ⇒ Error
constructor
A new instance of Error.
- #to_envelope ⇒ Object
Constructor Details
#initialize(code, message, info: nil, details: {}, exit_code: 1, hint: nil) ⇒ Error
Returns a new instance of Error.
11 12 13 14 15 |
# File 'lib/textus/errors.rb', line 11 def initialize(code, , info: nil, details: {}, exit_code: 1, hint: nil) super() @code = code @info = info || ErrorInfo.for(details:, exit_code:, hint:) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
9 10 11 |
# File 'lib/textus/errors.rb', line 9 def code @code end |
Instance Method Details
#details ⇒ Object
17 |
# File 'lib/textus/errors.rb', line 17 def details = @info.details |
#exit_code ⇒ Object
18 |
# File 'lib/textus/errors.rb', line 18 def exit_code = @info.exit_code |
#hint ⇒ Object
19 |
# File 'lib/textus/errors.rb', line 19 def hint = @info.hint |