From 8090fb252b434db986256651304cab04e0d426f8 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sun, 9 Sep 2018 19:28:56 -0400 Subject: 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. --- js/deno.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'js/deno.ts') 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[] = []; -- cgit v1.2.3