Terry J. Reedy <tjre...@udel.edu> added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43008>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to