123456789_123456789_123456789_123456789_123456789_

Exception: ActiveRecord::StatementInvalid

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ActiveRecordError, StandardError
Instance Chain:
self, ActiveRecordError, StandardError
Inherits: ActiveRecord::ActiveRecordError
Defined in: activerecord/lib/active_record/errors.rb

Overview

Superclass for all database execution errors.

Wraps the underlying database error as cause.

Class Method Summary

Instance Attribute Summary

Constructor Details

.new(message = nil, sql: nil, binds: nil) ⇒ StatementInvalid

[ GitHub ]

  
# File 'activerecord/lib/active_record/errors.rb', line 125

def initialize(message = nil, sql: nil, binds: nil)
  super(message || $!&.message)
  @sql = sql
  @binds = binds
end

Instance Attribute Details

#binds (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/errors.rb', line 131

attr_reader :sql, :binds

#sql (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/errors.rb', line 131

attr_reader :sql, :binds