instance method
translate_exception_class
Ruby on Rails edge
Since v4.1.16 Private — implementation detail, not part of the public APISignature
translate_exception_class(native_error, sql, binds)
No documentation comment.
Parameters
-
native_errorreq -
sqlreq -
bindsreq
Source
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 1267
def translate_exception_class(native_error, sql, binds)
return native_error if native_error.is_a?(ActiveRecordError)
message = "#{native_error.class.name}: #{native_error.message}"
active_record_error = translate_exception(
native_error, message: message, sql: sql, binds: binds
)
return active_record_error if active_record_error.equal?(native_error)
active_record_error.set_backtrace(native_error.backtrace)
begin
raise active_record_error, cause: native_error
rescue => error
error
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract_adapter.rb line 1267
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::AbstractAdapter