Commit 89b0470f authored by Guido van Rossum's avatar Guido van Rossum

Avoid dumping core when PyErr_NormalizeException() is called without

an exception set.  This shouldn't happen, but we see it at times...
parent d9f81209
......@@ -136,6 +136,12 @@ PyErr_NormalizeException(PyObject **exc, PyObject **val, PyObject **tb)
PyObject *value = *val;
PyObject *inclass = NULL;
if (type == NULL) {
/* This is a bug. Should never happen. Don't dump core. */
PyErr_SetString(PyExc_SystemError,
"PyErr_NormalizeException() called without exception");
}
/* If PyErr_SetNone() was used, the value will have been actually
set to NULL.
*/
......
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