Sha256: 845674514bbc104f4612790182203ae6588efc0e295b6f6ce46938306a723cbc

Contents?: true

Size: 495 Bytes

Versions: 2

Compression:

Stored size: 495 Bytes

Contents

module Sequel
  # This exception will be 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

  # This exception will be raised when raise_on_save_failure is set and a before hook returns false
  class BeforeHookFailed < Error; end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sequel-3.10.0 lib/sequel/model/exceptions.rb
sequel-3.9.0 lib/sequel/model/exceptions.rb