fix disrupts

This commit is contained in:
2026-02-09 11:28:10 -06:00
parent 45556c344d
commit 3934cdb683
4 changed files with 25 additions and 5 deletions

View File

@@ -3406,7 +3406,12 @@ JSValue mcode_exec(JSContext *ctx, JSMCode *code, JSValue this_obj,
break;
}
if (JS_IsNull(frame->caller)) {
result = JS_Throw(ctx, JS_NewString(ctx, "unhandled disruption"));
/* Re-throw the original exception so the caller sees the real message */
JSValue exc = JS_GetException(ctx);
if (JS_IsNull(exc))
result = JS_ThrowInternalError(ctx, "unhandled disruption");
else
result = JS_Throw(ctx, exc);
frame = (JSFrameRegister *)JS_VALUE_GET_PTR(frame_ref.val);
goto done;
}