class Sequel::ValidationFailed

Exception class raised when raise_on_save_failure is set and validation fails

Attributes

errors[R]

The Sequel::Model::Errors object related to this exception.

model[R]

The Sequel::Model object related to this exception.

Public Class Methods

new(errors=nil) click to toggle source
Calls superclass method
   # File lib/sequel/model/exceptions.rb
41 def initialize(errors=nil)
42   if errors.is_a?(Sequel::Model)
43     @model = errors
44     errors = @model.errors
45   end
46 
47   if errors.respond_to?(:full_messages)
48     @errors = errors
49     super(errors.full_messages.join(', '))
50   else
51     super
52   end
53 end