Message385548
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 |
|
Date |
User |
Action |
Args |
2021-01-23 17:09:40 | terry.reedy | set | recipients:
+ terry.reedy, aroberge, AbyxDev |
2021-01-23 17:09:40 | terry.reedy | set | messageid: <1611421780.63.0.666504440104.issue43008@roundup.psfhosted.org> |
2021-01-23 17:09:40 | terry.reedy | link | issue43008 messages |
2021-01-23 17:09:40 | terry.reedy | create | |
|