mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 12:58:54 -05:00
fix(core): Fix incorrect index in Promise.all error reporting (#8913)
This commit is contained in:
parent
24844a0052
commit
115de4c81a
3 changed files with 4 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
const p = Promise.all([
|
||||
Promise.resolve(),
|
||||
(async (): Promise<never> => {
|
||||
await Promise.resolve();
|
||||
throw new Error("Promise.all()");
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[WILDCARD]Error: Promise.all()
|
||||
at [WILDCARD]tests/error_024_stack_promise_all.ts:[WILDCARD]
|
||||
at async Promise.all (index 0)
|
||||
at async Promise.all (index 1)
|
||||
at async [WILDCARD]tests/error_024_stack_promise_all.ts:[WILDCARD]
|
||||
error: Uncaught Error: Promise.all()
|
||||
at [WILDCARD]tests/error_024_stack_promise_all.ts:[WILDCARD]
|
||||
at async Promise.all (index 0)
|
||||
at async Promise.all (index 1)
|
||||
at async [WILDCARD]tests/error_024_stack_promise_all.ts:[WILDCARD]
|
||||
|
|
|
@ -293,7 +293,7 @@ impl JsError {
|
|||
.unwrap();
|
||||
let is_promise_all = is_promise_all.is_true();
|
||||
let promise_index: Option<v8::Local<v8::Integer>> =
|
||||
get_property(scope, call_site, "columnNumber")
|
||||
get_property(scope, call_site, "promiseIndex")
|
||||
.unwrap()
|
||||
.try_into()
|
||||
.ok();
|
||||
|
|
Loading…
Reference in a new issue