mirror of
https://github.com/python/cpython.git
synced 2025-09-03 15:31:08 +00:00
Merge #17413: make sure settrace funcs get passed exception instances for 'value'.
Patch by Ingrid Cheung and Brendan McLoughlin.
This commit is contained in:
commit
f097f175dd
4 changed files with 30 additions and 0 deletions
|
@ -3793,6 +3793,7 @@ call_exc_trace(Py_tracefunc func, PyObject *self, PyFrameObject *f)
|
|||
value = Py_None;
|
||||
Py_INCREF(value);
|
||||
}
|
||||
PyErr_NormalizeException(&type, &value, &traceback);
|
||||
arg = PyTuple_Pack(3, type, value, traceback);
|
||||
if (arg == NULL) {
|
||||
PyErr_Restore(type, value, traceback);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue