Exception: ActiveRecord::StatementInvalid

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

Overview

Superclass for all database execution errors.

Wraps the underlying database error as original_exception.

Direct Known Subclasses

WrappedDatabaseException

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, original_exception = nil) ⇒ StatementInvalid

Returns a new instance of StatementInvalid.



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

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

Instance Attribute Details

#original_exceptionObject (readonly)

Returns the value of attribute original_exception



64
65
66
# File 'activerecord/lib/active_record/errors.rb', line 64

def original_exception
  @original_exception
end