mirror of https://github.com/rails/rails
errors should probably be logged as errors
This commit is contained in:
parent
94a20d94d5
commit
e6c95fe391
|
@ -293,7 +293,7 @@ module ActiveRecord
|
|||
:binds => binds) { yield }
|
||||
rescue Exception => e
|
||||
message = "#{e.class.name}: #{e.message}: #{sql}"
|
||||
@logger.debug message if @logger
|
||||
@logger.error message if @logger
|
||||
exception = translate_exception(e, message)
|
||||
exception.set_backtrace e.backtrace
|
||||
raise exception
|
||||
|
@ -303,7 +303,6 @@ module ActiveRecord
|
|||
# override in derived class
|
||||
ActiveRecord::StatementInvalid.new(message)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue