1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00
denoland-deno/tests/specs/run/complex_error/complex_error.ts
2024-11-05 06:39:05 +00:00

18 lines
442 B
TypeScript

const error = new AggregateError(
[
new AggregateError([new Error("qux1"), new Error("quux1")]),
new Error("bar1", { cause: new Error("baz1") }),
],
"foo1",
{
cause: new AggregateError([
new AggregateError([new Error("qux2"), new Error("quux2")]),
new Error("bar2", { cause: new Error("baz2") }),
], "foo2"),
},
);
console.log(error.stack);
console.log();
console.log(error);
console.log();
throw error;