The "workaround" way to do this in Python 2 is to use sys.exc_info() to capture sys.exc_info()[2] (the traceback at the time the exception is being handled).
I want to save the traceback for later, and there seem to be some caveats to doing this[1]. So I'll just keep it as-is until we drop support for Python 2.
The "workaround" way to do this in Python 2 is to use sys.exc_info() to capture sys.exc_info()[2] (the traceback at the time the exception is being handled).
I want to save the traceback for later, and there seem to be some caveats to doing this[1]. So I'll just keep it as-is until we drop support for Python 2.
[1]: https:/ /docs.python. org/2/library/ sys.html# sys.exc_ info