edge badge

Superclass for all database execution errors.

Wraps the underlying database error as cause.

Methods
N
O
Class Public methods
new(message = nil, original_exception = nil)
# File activerecord/lib/active_record/errors.rb, line 98
def initialize(message = nil, original_exception = nil)
  if original_exception
    ActiveSupport::Deprecation.warn("Passing #original_exception is deprecated and has no effect. "                                          "Exceptions will automatically capture the original exception.", caller)
  end

  super(message || $!.try(:message))
end
Instance Public methods
original_exception()
# File activerecord/lib/active_record/errors.rb, line 107
def original_exception
  ActiveSupport::Deprecation.warn("#original_exception is deprecated. Use #cause instead.", caller)
  cause
end