We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f5302f commit 046255cCopy full SHA for 046255c
Misc/NEWS.d/next/C API/2020-03-13-16-44-23.bpo-35370.sXRA-r.rst
@@ -0,0 +1,2 @@
1
+If :c:func:`PySys_Audit` fails in :c:func:`PyEval_SetProfile` or
2
+:c:func:`PyEval_SetTrace`, log the error as an unraisable exception.
Python/ceval.c
@@ -4686,6 +4686,7 @@ void
4686
PyEval_SetProfile(Py_tracefunc func, PyObject *arg)
4687
{
4688
if (PySys_Audit("sys.setprofile", NULL) < 0) {
4689
+ _PyErr_WriteUnraisableMsg("in PyEval_SetProfile", NULL);
4690
return;
4691
}
4692
@@ -4707,6 +4708,7 @@ void
4707
4708
PyEval_SetTrace(Py_tracefunc func, PyObject *arg)
4709
4710
if (PySys_Audit("sys.settrace", NULL) < 0) {
4711
+ _PyErr_WriteUnraisableMsg("in PyEval_SetTrace", NULL);
4712
4713
4714
0 commit comments