From ef06103fa201fac8843ff41de6d73043cd7b4933 Mon Sep 17 00:00:00 2001 From: killcerr Date: Mon, 2 Feb 2026 21:30:40 +0800 Subject: [PATCH] fix #440 --- src/interpreter/ceval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interpreter/ceval.c b/src/interpreter/ceval.c index 6700108e..6076464b 100644 --- a/src/interpreter/ceval.c +++ b/src/interpreter/ceval.c @@ -1167,10 +1167,10 @@ __NEXT_STEP: has_invalid = true; } if(has_invalid) { - py_clearexc(NULL); + py_newnil(&self->unhandled_exc); TypeError("catching classes that do not inherit from BaseException is not allowed"); c11_vector__pop(&frame->exc_stack); - goto __ERROR_RE_RAISE; + goto __ERROR; } else { py_newbool(TOP(), ok); DISPATCH();