deno/cli/tests/testdata/error_cause_recursive.ts
2021-12-29 19:34:13 +01:00

4 lines
92 B
TypeScript

const x = new Error("foo");
const y = new Error("bar", { cause: x });
x.cause = y;
throw y;