提交 3d6ed501 编写于 作者: A Andrew 提交者: Michael Koziarski

Don't rewrap system level exceptions with StatementInvalid

Signed-off-by: NMichael Koziarski <michael@koziarski.com>
[#896 state:committed]
上级 b760d699
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册