Kaydet (Commit) 365b693a authored tarafından Victor Stinner's avatar Victor Stinner

Issue #18408: ceval.c: in debug mode, convert the PyErr_Occurred() check on

exception (when getting NULL) to an assertion to detect bugs earlier
üst c31df042
......@@ -3026,9 +3026,13 @@ error:
why = WHY_EXCEPTION;
/* Double-check exception status. */
#ifdef NDEBUG
if (!PyErr_Occurred())
PyErr_SetString(PyExc_SystemError,
"error return without exception set");
#else
assert(PyErr_Occurred());
#endif
/* Log traceback info. */
PyTraceBack_Here(f);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment