Exception: Sequel::HookFailed
- Defined in:
- lib/sequel/model/exceptions.rb
Overview
Exception class raised when raise_on_save_failure
is set and a before hook returns false or an around hook doesn’t call super or yield.
Constant Summary
Constants inherited from Error
Error::AdapterNotFound, Error::InvalidOperation, Error::InvalidValue, Error::PoolTimeoutError, Error::Rollback
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
The Sequel::Model instance related to this error.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message, model = nil) ⇒ HookFailed
constructor
A new instance of HookFailed.
Constructor Details
#initialize(message, model = nil) ⇒ HookFailed
Returns a new instance of HookFailed.
8 9 10 11 |
# File 'lib/sequel/model/exceptions.rb', line 8 def initialize(, model=nil) @model = model super() end |
Instance Attribute Details
#model ⇒ Object (readonly)
The Sequel::Model instance related to this error.
6 7 8 |
# File 'lib/sequel/model/exceptions.rb', line 6 def model @model end |