Sha256: f45cfcd724ffae1e029b54479f95abbf9c52438918e6165315c202c3ea38fe51
Contents?: true
Size: 870 Bytes
Versions: 3
Compression:
Stored size: 870 Bytes
Contents
module Sequel # 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. class HookFailed < Error; end BeforeHookFailed = HookFailed # Exception class raised when +require_modification+ is set and an UPDATE or DELETE statement to modify the dataset doesn't # modify a single row. class NoExistingObject < Error; end # Raised when an undefined association is used when eager loading. class UndefinedAssociation < Error; end # Exception class raised when +raise_on_save_failure+ is set and validation fails class ValidationFailed < Error def initialize(errors) if errors.respond_to?(:full_messages) @errors = errors super(errors.full_messages.join(', ')) else super end end attr_reader :errors end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sequel-3.25.0 | lib/sequel/model/exceptions.rb |
sequel-3.24.1 | lib/sequel/model/exceptions.rb |
sequel-3.24.0 | lib/sequel/model/exceptions.rb |