summaryrefslogtreecommitdiff
path: root/tests/testdata/error_cause_recursive_aggregate.ts
blob: 4bb2ae06453ea7a807fa10423e5b1d82a547d292 (plain)
1
2
3
4
5
6
7
8
9
const foo = new Error("foo");
const bar = new Error("bar", { cause: foo });
foo.cause = bar;

const qux = new Error("qux");
const quux = new Error("quux", { cause: qux });
qux.cause = quux;

throw new AggregateError([bar, quux]);