Skip to content

Commit

Permalink
Don't rewrap system level exceptions with StatementInvalid
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#896 state:committed]
  • Loading branch information
Andrew authored and NZKoz committed May 29, 2010
1 parent b760d69 commit 3d6ed50
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ 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
# Log message and raise exception.
# Set last_verification to 0, so that connection gets verified
Expand Down

0 comments on commit 3d6ed50

Please sign in to comment.