summaryrefslogtreecommitdiff
path: root/runtime/js/01_errors.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-06-29 01:43:03 +0200
committerGitHub <noreply@github.com>2021-06-29 01:43:03 +0200
commit38a7128cdd6f3308ba3c13cfb0b0d4ef925a44c3 (patch)
tree8f0c86028d9ba0266f1846e7f3611f7049cb43a8 /runtime/js/01_errors.js
parent30cba2484815f712502ae8937a25afa13aba0818 (diff)
feat: Add "deno_net" extension (#11150)
This commits moves implementation of net related APIs available on "Deno" namespace to "deno_net" extension. Following APIs were moved: - Deno.listen() - Deno.connect() - Deno.listenTls() - Deno.serveHttp() - Deno.shutdown() - Deno.resolveDns() - Deno.listenDatagram() - Deno.startTls() - Deno.Conn - Deno.Listener - Deno.DatagramConn
Diffstat (limited to 'runtime/js/01_errors.js')
-rw-r--r--runtime/js/01_errors.js17
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);