Clear exception flag when raising new exception in 'from ... import ...'

This commit is contained in:
K. Lange 2023-06-13 16:42:46 +09:00
parent 2bc4637f5c
commit 011a33ff43

View File

@ -2744,6 +2744,7 @@ _finishReturn: (void)0;
krk_push(OBJECT_VAL(name));
krk_addObjects();
if (!krk_doRecursiveModuleLoad(AS_STRING(krk_peek(0)))) {
krk_currentThread.flags &= ~KRK_THREAD_HAS_EXCEPTION;
krk_runtimeError(vm.exceptions->importError, "Can not import '%S' from '%S'", name, AS_STRING(moduleName));
goto _finishException;
}