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

NoDatabaseError, WrappedDatabaseException

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (StatementInvalid) initialize(message, original_exception = nil)



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

- (Object) original_exception (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