Commit ac8c7307 authored by Benjamin Peterson's avatar Benjamin Peterson

this is better written as an assertion

parent fec42da1
...@@ -1823,15 +1823,9 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) ...@@ -1823,15 +1823,9 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
created when the exception was caught, otherwise created when the exception was caught, otherwise
the stack will be in an inconsistent state. */ the stack will be in an inconsistent state. */
PyTryBlock *b = PyFrame_BlockPop(f); PyTryBlock *b = PyFrame_BlockPop(f);
if (b->b_type != EXCEPT_HANDLER) { assert(b->b_type == EXCEPT_HANDLER);
PyErr_SetString(PyExc_SystemError, UNWIND_EXCEPT_HANDLER(b);
"popped block is not an except handler"); why = WHY_NOT;
why = WHY_EXCEPTION;
}
else {
UNWIND_EXCEPT_HANDLER(b);
why = WHY_NOT;
}
} }
} }
else if (PyExceptionClass_Check(v)) { else if (PyExceptionClass_Check(v)) {
......
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