[issue39228] traceback.FrameSummary does not handle exceptions from `repr()`

Martin report at bugs.python.org
Wed Mar 31 07:32:19 EDT 2021


Martin <martin.schroeder at nerdluecht.de> added the comment:

> Even correctly raised code can raise exceptions such as MemoryError, RecursionError and KeybordInterrupt.

For me, this is an argument in favor of the change (although KeybordInterrupt and probably a couple more should not be caught).

traceback is used in contexts where an error already occured and it should do its best to help the user find the cause for it. It does not help much if itself then fails because some values are not repr'eable.

What does pdb do in this case?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39228>
_______________________________________


More information about the Python-bugs-list mailing list