mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
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.
This commit is contained in:
parent
77e9aae383
commit
6bc889aedc
1 changed files with 4 additions and 0 deletions
|
@ -450,6 +450,10 @@ error:
|
|||
"RunFailedError: script raised an uncaught exception (%s)",
|
||||
failure);
|
||||
}
|
||||
// XXX Instead, store the rendered traceback on sharedexc,
|
||||
// attach it to the exception when applied,
|
||||
// and teach PyErr_Display() to print it.
|
||||
PyErr_Display(NULL, excval, NULL);
|
||||
Py_XDECREF(excval);
|
||||
if (errcode != ERR_ALREADY_RUNNING) {
|
||||
_PyInterpreterState_SetNotRunningMain(interp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue