Skip to content

Commit 6bc889a

Browse files
gh-76785: Print the Traceback from Interpreter.run() (gh-110248)
This is a temporary fix. The full fix may involve serializing the traceback in some form.
1 parent 77e9aae commit 6bc889a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Modules/_xxsubinterpretersmodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,10 @@ _run_script(PyInterpreterState *interp, const char *codestr,
450450
"RunFailedError: script raised an uncaught exception (%s)",
451451
failure);
452452
}
453+
// XXX Instead, store the rendered traceback on sharedexc,
454+
// attach it to the exception when applied,
455+
// and teach PyErr_Display() to print it.
456+
PyErr_Display(NULL, excval, NULL);
453457
Py_XDECREF(excval);
454458
if (errcode != ERR_ALREADY_RUNNING) {
455459
_PyInterpreterState_SetNotRunningMain(interp);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy