mirror of
https://github.com/denoland/deno.git
synced 2024-11-25 15:29:32 -05:00
chore(ops): include argument position in serde_v8 errors (#14027)
This commit is contained in:
parent
7d853ff33b
commit
3a106f08d8
2 changed files with 2 additions and 2 deletions
2
cli/tests/testdata/workers/test.ts
vendored
2
cli/tests/testdata/workers/test.ts
vendored
|
@ -593,7 +593,7 @@ Deno.test("Worker with invalid permission arg", function () {
|
|||
deno: { permissions: { env: "foo" } },
|
||||
}),
|
||||
TypeError,
|
||||
'Error parsing args: (deno.permissions.env) invalid value: string "foo", expected "inherit" or boolean or string[]',
|
||||
'Error parsing args at position 1: (deno.permissions.env) invalid value: string "foo", expected "inherit" or boolean or string[]',
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ fn codegen_arg(
|
|||
let #ident = match #core::serde_v8::from_v8(scope, #ident) {
|
||||
Ok(v) => v,
|
||||
Err(err) => {
|
||||
let msg = format!("Error parsing args: {}", #core::anyhow::Error::from(err));
|
||||
let msg = format!("Error parsing args at position {}: {}", #idx, #core::anyhow::Error::from(err));
|
||||
return #core::_ops::throw_type_error(scope, msg);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue