Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 904ed86

Browse files
committed
Make undetected error on stack unwind a fatal error.
1 parent 92bee36 commit 904ed86

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Python/ceval.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,10 +2306,10 @@ eval_frame(PyFrameObject *f)
23062306
else {
23072307
/* This check is expensive! */
23082308
if (PyErr_Occurred()) {
2309-
fprintf(stderr,
2310-
"XXX undetected error (why=%d)\n",
2311-
why);
2312-
why = WHY_EXCEPTION;
2309+
char buf[1024];
2310+
sprintf(buf, "Stack unwind with exception "
2311+
"set and why=%d", why);
2312+
Py_FatalError(buf);
23132313
}
23142314
}
23152315
#endif

0 commit comments

Comments
 (0)