Exception: ActiveRecord::WrappedDatabaseException

Inherits:
StatementInvalid show all
Defined in:
lib/active_record/errors.rb

Overview

Parent class for all specific exceptions which wrap database driver exceptions provides access to the original exception also.

Direct Known Subclasses

InvalidForeignKey, RecordNotUnique

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, original_exception) ⇒ WrappedDatabaseException

Returns a new instance of WrappedDatabaseException.



70
71
72
73
# File 'lib/active_record/errors.rb', line 70

def initialize(message, original_exception)
  super(message)
  @original_exception = original_exception
end

Instance Attribute Details

#original_exceptionObject (readonly)

Returns the value of attribute original_exception.



68
69
70
# File 'lib/active_record/errors.rb', line 68

def original_exception
  @original_exception
end