/usr/lib/ruby/vendor_ruby/sequel/model/exceptions.rb is in ruby-sequel 3.33.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 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
# Deprecated alias for HookFailed, kept for backwards compatibility
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
|