This commit is contained in:
killcerr 2026-02-02 21:30:40 +08:00
parent 2f776ae05a
commit ef06103fa2

View File

@ -1167,10 +1167,10 @@ __NEXT_STEP:
has_invalid = true; has_invalid = true;
} }
if(has_invalid) { if(has_invalid) {
py_clearexc(NULL); py_newnil(&self->unhandled_exc);
TypeError("catching classes that do not inherit from BaseException is not allowed"); TypeError("catching classes that do not inherit from BaseException is not allowed");
c11_vector__pop(&frame->exc_stack); c11_vector__pop(&frame->exc_stack);
goto __ERROR_RE_RAISE; goto __ERROR;
} else { } else {
py_newbool(TOP(), ok); py_newbool(TOP(), ok);
DISPATCH(); DISPATCH();