mirror of
https://github.com/denoland/deno.git
synced 2024-10-31 09:14:20 -04:00
a87be28a46
This commit adds "aggregated" field to "deno_core::JsError" that stores instances of "JsError" recursively to properly handle "AggregateError" formatting. Appropriate logics was added to "PrettyJsError" and "console" API to format AggregateErrors. Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
15 lines
567 B
Text
15 lines
567 B
Text
[WILDCARD]
|
|
error: Uncaught Error: foo
|
|
throw new Error("foo", { cause: new Error("bar", { cause: "deno" as any }) });
|
|
^
|
|
at a (file:///[WILDCARD]/error_cause.ts:3:9)
|
|
at b (file:///[WILDCARD]/error_cause.ts:7:3)
|
|
at c (file:///[WILDCARD]/error_cause.ts:11:3)
|
|
at file:///[WILDCARD]/error_cause.ts:14:1
|
|
Caused by: Error: bar
|
|
at a (file:///[WILDCARD]/error_cause.ts:3:35)
|
|
at b (file:///[WILDCARD]/error_cause.ts:7:3)
|
|
at c (file:///[WILDCARD]/error_cause.ts:11:3)
|
|
at file:///[WILDCARD]/error_cause.ts:14:1
|
|
Caused by: deno
|
|
[WILDCARD]
|