Module: Kobako::StructuredError
- Included in:
- SandboxError, ServiceError
- Defined in:
- lib/kobako/errors.rb,
sig/kobako/errors.rbs
Overview
The structured attribution the two invocation-failure classes carry
from a decoded guest exception — its origin, original klass,
backtrace_lines, and details — so a Host App can inspect a failure
beyond its message. Mixed into both rather than promoted to a shared
superclass because SandboxError and ServiceError sit in distinct
branches of the invocation-outcome taxonomy under Kobako::Error.
Instance Attribute Summary collapse
-
#backtrace_lines ⇒ Array[String]?
readonly
Returns the value of attribute backtrace_lines.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#klass ⇒ String?
readonly
Returns the value of attribute klass.
-
#origin ⇒ String?
readonly
Returns the value of attribute origin.
Instance Method Summary collapse
Instance Attribute Details
#backtrace_lines ⇒ Array[String]? (readonly)
Returns the value of attribute backtrace_lines.
99 100 101 |
# File 'lib/kobako/errors.rb', line 99 def backtrace_lines @backtrace_lines end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
99 100 101 |
# File 'lib/kobako/errors.rb', line 99 def details @details end |
#klass ⇒ String? (readonly)
Returns the value of attribute klass.
99 100 101 |
# File 'lib/kobako/errors.rb', line 99 def klass @klass end |
#origin ⇒ String? (readonly)
Returns the value of attribute origin.
99 100 101 |
# File 'lib/kobako/errors.rb', line 99 def origin @origin end |
Instance Method Details
#initialize(message, origin: nil, klass: nil, backtrace_lines: nil, details: nil) ⇒ Object
101 102 103 104 105 106 107 |
# File 'lib/kobako/errors.rb', line 101 def initialize(, origin: nil, klass: nil, backtrace_lines: nil, details: nil) super() @origin = origin @klass = klass @backtrace_lines = backtrace_lines @details = details end |