Exception: Sequel::HookFailed

Inherits:
Error show all
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

Attributes inherited from Error

#wrapped_exception

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, model = nil) ⇒ HookFailed

Returns a new instance of HookFailed.



10
11
12
13
# File 'lib/sequel/model/exceptions.rb', line 10

def initialize(message=nil, model=nil)
  @model = model
  super(message)
end

Instance Attribute Details

#modelObject (readonly)

The Sequel::Model instance related to this error.



8
9
10
# File 'lib/sequel/model/exceptions.rb', line 8

def model
  @model
end