diff options
author | Dylan Smith <Dylan.Smith@shopify.com> | 2012-06-17 03:26:10 -0400 |
---|---|---|
committer | Dylan Smith <Dylan.Smith@shopify.com> | 2012-06-17 03:50:14 -0400 |
commit | c9891608aa1e5ebbab04afe73bf7a28748001804 (patch) | |
tree | 4e17cc4624136daa1f720ba47d92f126478cb3a3 /activerecord/lib/active_record/connection_adapters/abstract | |
parent | 7381968c08a1a6a6c6f5bf02ac461b1cc63778f2 (diff) | |
download | rails-c9891608aa1e5ebbab04afe73bf7a28748001804.tar.gz rails-c9891608aa1e5ebbab04afe73bf7a28748001804.tar.bz2 rails-c9891608aa1e5ebbab04afe73bf7a28748001804.zip |
Avoid unnecessary catching of Exception instead of StandardError.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb index 4c6d03a1d2..b0b51f540c 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb @@ -370,7 +370,7 @@ module ActiveRecord records.uniq.each do |record| begin record.rolledback!(rollback) - rescue Exception => e + rescue => e record.logger.error(e) if record.respond_to?(:logger) && record.logger end end @@ -385,7 +385,7 @@ module ActiveRecord records.uniq.each do |record| begin record.committed! - rescue Exception => e + rescue => e record.logger.error(e) if record.respond_to?(:logger) && record.logger end end |