Provide a traceback (and proxy) for propagated exceptions. #17
Labels
complexity: medium
moderately hard to figure out
P1
medium priority
size: medium
requires a moderate amount of changes
type: enhancement
X [cross-interpreter]
e.g. channels
from PEP 554:
Currently uncaught exceptions from
Interpreter.run()
are stringified and then wrapped in aRunFailedError
before being raised in the calling interpreter. This was fine in theory. However, as I've been using subinterpreters in tests I've found that this approach is extremely cumbersome for two reasons:The solution: "propagate" the original exception and traceback through to the calling interpreter. This is tricky because the exception and traceback must go through the cross-interpreter data machinery. The result would be an exception that matches the original (i.e. a proxy), including a traceback that works as an effective substitute (and any
__cause__
, etc. set).Once that is sorted out, we'll set the
__cause__
of the raisedRunFailedError
to the proxy of the original exception. We would end up with tracebacks that look like this:Also, how do we get the traceback (e.g. lineno) right?
The text was updated successfully, but these errors were encountered: