class Sequel::DatabaseError

  1. lib/sequel/extensions/error_sql.rb
Superclass: Object

Methods

Public Instance

  1. sql

Public Instance methods

sql()

Get the SQL code that caused this error to be raised.

[show source]
   # File lib/sequel/extensions/error_sql.rb
39 def sql
40   # We store the error SQL in the wrapped exception instead of the
41   # current exception, since when the error SQL is originally associated
42   # with the wrapped exception, the current exception doesn't exist.  It's
43   # possible to copy the error SQL into the current exception, but there
44   # doesn't seem to be a reason to do that.
45   wrapped_exception.instance_variable_get(:@sequel_error_sql) if wrapped_exception
46 end