diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2016-09-26 14:16:32 -0400 |
---|---|---|
committer | Gerrit Code Review <gerrit2@ln3.zzzcomputing.com> | 2016-09-26 14:16:32 -0400 |
commit | f09056323e2c7b51ecdf02f8c31e7529382ed0f8 (patch) | |
tree | 258f7621b08ddbefce2d4ccd6d5e29ff838c1810 /lib/sqlalchemy/events.py | |
parent | e9b2625753fba02358d9cb4ef1d9dd07b8761d21 (diff) | |
parent | 7827dfb6726a682c630d66b24423582d5dc09589 (diff) | |
download | sqlalchemy-f09056323e2c7b51ecdf02f8c31e7529382ed0f8.tar.gz |
Merge "Handle BaseException in all _handle_dbapi_error"
Diffstat (limited to 'lib/sqlalchemy/events.py')
-rw-r--r-- | lib/sqlalchemy/events.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/sqlalchemy/events.py b/lib/sqlalchemy/events.py index e99c5b5e5..8776f6562 100644 --- a/lib/sqlalchemy/events.py +++ b/lib/sqlalchemy/events.py @@ -741,6 +741,9 @@ class ConnectionEvents(event.Events): * read-only, low-level exception handling for logging and debugging purposes * exception re-writing + * Establishing or disabling whether a connection or the owning + connection pool is invalidated or expired in response to a + specific exception. The hook is called while the cursor from the failed operation (if any) is still open and accessible. Special cleanup operations @@ -806,6 +809,13 @@ class ConnectionEvents(event.Events): .. versionadded:: 0.9.7 Added the :meth:`.ConnectionEvents.handle_error` hook. + .. versionchanged:: 1.1 The :meth:`.handle_error` event will now + receive all exceptions that inherit from ``BaseException``, including + ``SystemExit`` and ``KeyboardInterrupt``. The setting for + :attr:`.ExceptionContext.is_disconnect` is ``True`` in this case + and the default for :attr:`.ExceptionContext.invalidate_pool_on_disconnect` + is ``False``. + .. versionchanged:: 1.0.0 The :meth:`.handle_error` event is now invoked when an :class:`.Engine` fails during the initial call to :meth:`.Engine.connect`, as well as when a |