Exception: DevCycle::AfterHookError
- Inherits:
-
StandardError
- Object
- StandardError
- DevCycle::AfterHookError
- Defined in:
- lib/devcycle-ruby-server-sdk/eval_hooks_runner.rb
Overview
Custom error raised when an after hook fails
Instance Attribute Summary collapse
-
#hook_context ⇒ Object
readonly
Returns the value of attribute hook_context.
-
#original_error ⇒ Object
readonly
Returns the value of attribute original_error.
Instance Method Summary collapse
-
#initialize(message = nil, original_error = nil, hook_context = nil) ⇒ AfterHookError
constructor
A new instance of AfterHookError.
- #to_s ⇒ Object
Constructor Details
#initialize(message = nil, original_error = nil, hook_context = nil) ⇒ AfterHookError
26 27 28 29 30 |
# File 'lib/devcycle-ruby-server-sdk/eval_hooks_runner.rb', line 26 def initialize( = nil, original_error = nil, hook_context = nil) super( || "After hook execution failed") @original_error = original_error @hook_context = hook_context end |
Instance Attribute Details
#hook_context ⇒ Object (readonly)
Returns the value of attribute hook_context.
24 25 26 |
# File 'lib/devcycle-ruby-server-sdk/eval_hooks_runner.rb', line 24 def hook_context @hook_context end |
#original_error ⇒ Object (readonly)
Returns the value of attribute original_error.
24 25 26 |
# File 'lib/devcycle-ruby-server-sdk/eval_hooks_runner.rb', line 24 def original_error @original_error end |
Instance Method Details
#to_s ⇒ Object
32 33 34 35 36 |
# File 'lib/devcycle-ruby-server-sdk/eval_hooks_runner.rb', line 32 def to_s msg = super msg += "\nOriginal error: #{@original_error.message}" if @original_error msg end |