Exception: ActiveRecord::StatementInvalid

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

Overview

Superclass for all database execution errors.

Wraps the underlying database error as original_exception.

Direct Known Subclasses

NoDatabaseError, WrappedDatabaseException

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, original_exception = nil) ⇒ StatementInvalid

Returns a new instance of StatementInvalid.



86
87
88
89
# File 'lib/active_record/errors.rb', line 86

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.



84
85
86
# File 'lib/active_record/errors.rb', line 84

def original_exception
  @original_exception
end