Superclass for all database execution errors.

Wraps the underlying database error as cause.

Methods

Attributes

[R] binds
[R] sql

Class Public methods

new(message = nil, sql: nil, binds: nil)

📝 Source code
# 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
🔎 See on GitHub