diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-10-28 08:43:40 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-28 08:43:40 +1100 |
commit | a065604155991dbf4417b606d4562d275cd8955f (patch) | |
tree | 7f7048d25741e503d795fb9dcc66ca32b4b4fbd0 /cli/tests/testdata/resolve_dns.ts | |
parent | be68b82eb43f8e6156bad562b292af11776d38b8 (diff) |
feat(cli): enable `useUnknownInCatchVariables` by default (#12547)
Closes #11826
**BREAKING CHANGE** this behaviour was disable when introduced in Deno 1.14/TypeScript 4.4. It will highlight code that unsafely handles variables that are caught, and will cause type errors in unsafe code.
Diffstat (limited to 'cli/tests/testdata/resolve_dns.ts')
-rw-r--r-- | cli/tests/testdata/resolve_dns.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/tests/testdata/resolve_dns.ts b/cli/tests/testdata/resolve_dns.ts index e4a50f7dc..1757c938e 100644 --- a/cli/tests/testdata/resolve_dns.ts +++ b/cli/tests/testdata/resolve_dns.ts @@ -38,5 +38,9 @@ console.log(JSON.stringify(txt)); try { await Deno.resolveDns("not-found-example.com", "A", nameServer); } catch (e) { - console.log(`Error ${e.name} thrown for not-found-example.com`); + console.log( + `Error ${ + e instanceof Error ? e.name : "[non-error]" + } thrown for not-found-example.com`, + ); } |