diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-22 14:37:53 -0500 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-22 15:41:13 -0500 |
commit | 3eae734012fadd641a4ec95715480b962861294c (patch) | |
tree | a04fe2d757d1f0a6e097dfa8ec15c002430be2ce /activerecord | |
parent | d42e43b3e50efdcd75112db2bb386d62cda1eb6a (diff) | |
download | rails-3eae734012fadd641a4ec95715480b962861294c.tar.gz rails-3eae734012fadd641a4ec95715480b962861294c.tar.bz2 rails-3eae734012fadd641a4ec95715480b962861294c.zip |
set the backtrace to prevent AR exceptions from lying to us
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index d24cce0a3c..468a2b106b 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -223,7 +223,9 @@ module ActiveRecord rescue Exception => e message = "#{e.class.name}: #{e.message}: #{sql}" @logger.debug message if @logger - raise translate_exception(e, message) + exception = translate_exception(e, message) + exception.set_backtrace e.backtrace + raise exception end def translate_exception(e, message) |