Exception: ActiveRecord::WrappedDatabaseException

Inherits:
StatementInvalid show all
Defined in:
activerecord/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

- (WrappedDatabaseException) initialize(message, original_exception)

Returns a new instance of WrappedDatabaseException



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

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

Instance Attribute Details

- (Object) original_exception (readonly)

Returns the value of attribute original_exception



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

def original_exception
  @original_exception
end