Exception: SwarmSDK::Hooks::Error
- Inherits:
-
StandardError
- Object
- StandardError
- SwarmSDK::Hooks::Error
- Defined in:
- lib/swarm_sdk/hooks/error.rb
Overview
Error raised by callbacks to block execution
This error provides context about which hook failed and includes the execution context for debugging and error handling.
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#hook_name ⇒ Object
readonly
Returns the value of attribute hook_name.
Instance Method Summary collapse
-
#initialize(message, hook_name: nil, context: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, hook_name: nil, context: nil) ⇒ Error
Returns a new instance of Error.
22 23 24 25 26 |
# File 'lib/swarm_sdk/hooks/error.rb', line 22 def initialize(, hook_name: nil, context: nil) super() @hook_name = hook_name @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
17 18 19 |
# File 'lib/swarm_sdk/hooks/error.rb', line 17 def context @context end |
#hook_name ⇒ Object (readonly)
Returns the value of attribute hook_name.
17 18 19 |
# File 'lib/swarm_sdk/hooks/error.rb', line 17 def hook_name @hook_name end |