class ActiveRecord::JDBCError

Represents exceptions that have propagated up through the JDBC API.

Attributes

errno[RW]

The vendor code or error number that came from the database. @note writer being used by the Java API

original_exception[R]
raw_backtrace[R]
sql_exception[RW]

The full Java SQLException object that was raised. @note writer being used by the Java API

Public Class Methods

new(message = nil, original_exception = nil) click to toggle source
Calls superclass method
# File lib/arjdbc/jdbc/base_ext.rb, line 29
def initialize(message = nil, original_exception = nil) # $!
  super(message)
  @original_exception = original_exception
end

Public Instance Methods

set_backtrace(backtrace) click to toggle source
Calls superclass method
# File lib/arjdbc/jdbc/base_ext.rb, line 34
def set_backtrace(backtrace)
  @raw_backtrace = backtrace
  if nested = original_exception
    backtrace = backtrace - (
      nested.respond_to?(:raw_backtrace) ? nested.raw_backtrace : nested.backtrace )
    backtrace << "#{nested.backtrace.first}: #{nested.message} (#{nested.class.name})"
    backtrace += nested.backtrace[1..-1] || []
  end
  super(backtrace)
end