mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
4e38fbd0a3
Fixes: https://github.com/denoland/deno/issues/24713 Fixes: https://github.com/denoland/deno/issues/25855
13 lines
289 B
TypeScript
13 lines
289 B
TypeScript
import process from "node:process";
|
|
import { strictEqual } from "node:assert";
|
|
|
|
const error = new Error("thrown from next tick");
|
|
|
|
process.on("uncaughtException", (caught) => {
|
|
strictEqual(caught, error);
|
|
console.log("caught", caught);
|
|
});
|
|
|
|
process.nextTick(() => {
|
|
throw error;
|
|
});
|