diff options
Diffstat (limited to 'runtime/js/01_errors.js')
-rw-r--r-- | runtime/js/01_errors.js | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/runtime/js/01_errors.js b/runtime/js/01_errors.js index a46a0a149..d59bd7adb 100644 --- a/runtime/js/01_errors.js +++ b/runtime/js/01_errors.js @@ -2,6 +2,9 @@ "use strict"; ((window) => { + const core = window.Deno.core; + const { BadResource, Interrupted } = core; + class NotFound extends Error { constructor(msg) { super(msg); @@ -86,13 +89,6 @@ } } - class Interrupted extends Error { - constructor(msg) { - super(msg); - this.name = "Interrupted"; - } - } - class WriteZero extends Error { constructor(msg) { super(msg); @@ -107,13 +103,6 @@ } } - class BadResource extends Error { - constructor(msg) { - super(msg); - this.name = "BadResource"; - } - } - class Http extends Error { constructor(msg) { super(msg); |