mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
this is better written as an assertion
This commit is contained in:
@@ -1823,15 +1823,9 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
|
||||
created when the exception was caught, otherwise
|
||||
the stack will be in an inconsistent state. */
|
||||
PyTryBlock *b = PyFrame_BlockPop(f);
|
||||
if (b->b_type != EXCEPT_HANDLER) {
|
||||
PyErr_SetString(PyExc_SystemError,
|
||||
"popped block is not an except handler");
|
||||
why = WHY_EXCEPTION;
|
||||
}
|
||||
else {
|
||||
UNWIND_EXCEPT_HANDLER(b);
|
||||
why = WHY_NOT;
|
||||
}
|
||||
assert(b->b_type == EXCEPT_HANDLER);
|
||||
UNWIND_EXCEPT_HANDLER(b);
|
||||
why = WHY_NOT;
|
||||
}
|
||||
}
|
||||
else if (PyExceptionClass_Check(v)) {
|
||||
|
||||
Reference in New Issue
Block a user