mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 13:14:48 +00:00
feat(runtime): improve error messages of runtime fs (#11984)
This commit annotates errors returned from FS Deno APIs to include paths that were passed to the API calls. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
423b02d889
commit
668b400ff2
17 changed files with 589 additions and 135 deletions
|
@ -52,8 +52,12 @@ unitTest(
|
|||
{ permissions: { read: true, write: true } },
|
||||
function dirChdirError() {
|
||||
const path = Deno.makeTempDirSync() + "test";
|
||||
assertThrows(() => {
|
||||
Deno.chdir(path);
|
||||
}, Deno.errors.NotFound);
|
||||
assertThrows(
|
||||
() => {
|
||||
Deno.chdir(path);
|
||||
},
|
||||
Deno.errors.NotFound,
|
||||
`chdir '${path}'`,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue