From 2a70c9691d46c2c196c93c964d744c521aa83d89 Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Mon, 31 Mar 2014 13:35:28 +0200 Subject: [PATCH] We shouldn't try to rescue every type of exception here --- .../active_record/connection_adapters/abstract_adapter.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index 52eb982779..9225d92a44 100755 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -214,13 +214,7 @@ def log(sql, name) log_info(sql, name, 0) nil end - rescue SystemExit, SignalException, NoMemoryError => e - # Don't re-wrap these exceptions. They are probably not being caused by invalid - # sql, but rather some external stimulus beyond the responsibilty of this code. - # Additionaly, wrapping these exceptions with StatementInvalid would lead to - # meaningful loss of data, such as losing SystemExit#status. - raise e - rescue Exception => e + rescue => e # Log message and raise exception. # Set last_verification to 0, so that connection gets verified # upon reentering the request loop -- GitLab