mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-02 08:35:07 +08:00
- Preserve fields, accessors, added properties, and cyclic references across untyped class boundaries. - Support platform signal names and native exception handlers that resume queued work.
14 lines
531 B
JavaScript
14 lines
531 B
JavaScript
// @no-node-shims
|
|
process.once("uncaughtExceptionMonitor", (error, origin) => {
|
|
console.log("monitor", error.message, origin);
|
|
});
|
|
const removed = () => console.log("should not run");
|
|
process.on("uncaughtException", removed);
|
|
process.off("uncaughtException", removed);
|
|
process.once("uncaughtException", (error, origin) => {
|
|
console.log("handled", error instanceof Error, error.message, origin);
|
|
process.nextTick(() => console.log("handler tick"));
|
|
});
|
|
setTimeout(() => console.log("survived"), 10);
|
|
throw new Error("entry");
|