From dd8a10948195f231a6a9eb652e3f208813904ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 21 Feb 2020 10:36:13 -0500 Subject: refactor: remove unneeded ErrorKinds (#3936) --- cli/js/dir_test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/js/dir_test.ts') diff --git a/cli/js/dir_test.ts b/cli/js/dir_test.ts index 4b03eaedd..f936986aa 100644 --- a/cli/js/dir_test.ts +++ b/cli/js/dir_test.ts @@ -29,7 +29,7 @@ testPerm({ write: true }, function dirCwdError(): void { Deno.cwd(); throw Error("current directory removed, should throw error"); } catch (err) { - if (err instanceof Deno.DenoError) { + if (err instanceof Deno.Err.NotFound) { console.log(err.name === "NotFound"); } else { throw Error("raised different exception"); @@ -45,7 +45,7 @@ testPerm({ write: true }, function dirChdirError(): void { Deno.chdir(path); throw Error("directory not available, should throw error"); } catch (err) { - if (err instanceof Deno.DenoError) { + if (err instanceof Deno.Err.NotFound) { console.log(err.name === "NotFound"); } else { throw Error("raised different exception"); -- cgit v1.2.3