diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-09-09 19:28:56 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-09-09 23:12:22 -0400 |
commit | 8090fb252b434db986256651304cab04e0d426f8 (patch) | |
tree | 2d0065530e0762e4952287f8628a7de9ae7ecbed /js/deno.ts | |
parent | a4f1b367b9314b1526c51dad593cac1682ef996b (diff) |
Expose deno.ErrorKind
Originally we planned to have a JS class for each error code. But it
seems better to just have a single DenoError class with a "kind"
property. One nice thing about using an enum instead of classes for
errors is that switch() can be used during error handling instead of a
bunch of instanceof branches.
Diffstat (limited to 'js/deno.ts')
-rw-r--r-- | js/deno.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/js/deno.ts b/js/deno.ts index 0b6b0fb9b..ba4a5151e 100644 --- a/js/deno.ts +++ b/js/deno.ts @@ -13,5 +13,6 @@ export { lstatSync, writeFileSync } from "./os"; +export { ErrorKind, DenoError } from "./errors"; export { libdeno } from "./libdeno"; export const argv: string[] = []; |