The handle_exception() method is registered as a receiver of the
got_request_exception signal. According to both the documentation
and source code of Flask the got_request_exception signal passes
the exception as exception rather than a exc_info.
This is likely to have gone unnoticed since captureException() calls
sys.exc_info() in the absence of an exception.
On Python 3 we can use __traceback__ to explicitly construct the
exc_info.
The handle_exception() method is registered as a receiver of the got_request_exception signal. According to both the documentation and source code of Flask the got_request_exception signal passes the exception as
exception
rather than aexc_info
.This is likely to have gone unnoticed since captureException() calls sys.exc_info() in the absence of an exception.
On Python 3 we can use
__traceback__
to explicitly construct theexc_info
.