This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients AbyxDev, aroberge, terry.reedy
Date 2021-01-23.17:09:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611421780.63.0.666504440104.issue43008@roundup.psfhosted.org>
In-reply-to
Content
Ken: I will probably work on tests, perhaps as a followup or parallel issue.  I will likely do a bit or refactoring to make testing easier.

I just looked at print_exception and discovered that the double traceback can likely by handled by properly setting exc.context for the 2nd exception.  But getting that right will be aided by having something that already works.

Possible manual test protocol in Shell

>>> import sys
>>> def egood(a,b,c): print('Exception traceback', file=sys.stderr)

>>> sys.excepthook = egood
>>> 1/0
# "Exception traceback"
>>> def ebad(a,b,c): z

>>> sys.excepthook = ebad
>>> 1/0
# Double traceback for ZeroDivisionError and NameError
History
Date User Action Args
2021-01-23 17:09:40terry.reedysetrecipients: + terry.reedy, aroberge, AbyxDev
2021-01-23 17:09:40terry.reedysetmessageid: <1611421780.63.0.666504440104.issue43008@roundup.psfhosted.org>
2021-01-23 17:09:40terry.reedylinkissue43008 messages
2021-01-23 17:09:40terry.reedycreate