Files
scriptc/tests/corpus/process-uncaught-module.mjs
Chris Tate 13718c7ac1 Preserve native class state and handle terminal process events (#571)
- Preserve fields, accessors, added properties, and cyclic references across untyped class boundaries.
- Support platform signal names and native exception handlers that resume queued work.
2026-09-29 09:09:34 -05:00

8 lines
323 B
JavaScript

process.once("uncaughtExceptionMonitor", (error, origin) => console.log("monitor", error.message, origin));
process.once("uncaughtException", (error, origin) => {
console.log("handled module", error.message, origin);
setTimeout(() => console.log("resumed"), 10);
});
await Promise.resolve();
throw new Error("module");