exit by default on unhandled promise rejections (issue #305)

This commit is contained in:
Fabrice Bellard
2025-03-27 14:22:58 +01:00
parent dec4aca27a
commit d20ffec831
2 changed files with 5 additions and 4 deletions

View File

@@ -3961,6 +3961,7 @@ void js_std_promise_rejection_tracker(JSContext *ctx, JSValueConst promise,
if (!is_handled) {
fprintf(stderr, "Possibly unhandled promise rejection: ");
js_std_dump_error1(ctx, reason);
exit(1);
}
}