[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

Chris Jerdonek report at bugs.python.org
Sat May 2 07:48:24 EDT 2020


Chris Jerdonek <chris.jerdonek at gmail.com> added the comment:

FYI, I was able to finish addressing the other exception-chaining cases (the ones covered by the other issue) with a simple change to the fix for this PR.

I moved the call to _PyErr_ChainExceptions() a bit deeper: into gen_send_ex() before the call to _PyEval_EvalFrame(), and behind an `if (exc)` check.

So I think the tracebacks should improve a lot.

----------

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


More information about the Python-bugs-list mailing list