Exception: Sequel::ValidationFailed
- Defined in:
- lib/sequel/model/exceptions.rb
Overview
Exception class raised when raise_on_save_failure
is set and validation fails
Constant Summary
Constants inherited from Error
Error::AdapterNotFound, Error::InvalidOperation, Error::InvalidValue, Error::PoolTimeoutError, Error::Rollback
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(errors) ⇒ ValidationFailed
constructor
A new instance of ValidationFailed.
Constructor Details
#initialize(errors) ⇒ ValidationFailed
Returns a new instance of ValidationFailed.
11 12 13 14 15 16 17 18 |
# File 'lib/sequel/model/exceptions.rb', line 11 def initialize(errors) if errors.respond_to?(:full_messages) @errors = errors super(errors..join(', ')) else super end end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
19 20 21 |
# File 'lib/sequel/model/exceptions.rb', line 19 def errors @errors end |