2021-01-10 21:59:07 -05:00
|
|
|
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
2020-07-19 13:49:44 -04:00
|
|
|
|
|
|
|
((window) => {
|
|
|
|
class NotFound extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "NotFound";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PermissionDenied extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "PermissionDenied";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class ConnectionRefused extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "ConnectionRefused";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class ConnectionReset extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "ConnectionReset";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class ConnectionAborted extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "ConnectionAborted";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class NotConnected extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "NotConnected";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class AddrInUse extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "AddrInUse";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class AddrNotAvailable extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "AddrNotAvailable";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class BrokenPipe extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "BrokenPipe";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class AlreadyExists extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "AlreadyExists";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class InvalidData extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "InvalidData";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class TimedOut extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "TimedOut";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Interrupted extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "Interrupted";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class WriteZero extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "WriteZero";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class UnexpectedEof extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "UnexpectedEof";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class BadResource extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "BadResource";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Http extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "Http";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Busy extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "Busy";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-25 18:22:15 -04:00
|
|
|
class NotSupported extends Error {
|
|
|
|
constructor(msg) {
|
|
|
|
super(msg);
|
|
|
|
this.name = "NotSupported";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-19 13:49:44 -04:00
|
|
|
const errors = {
|
|
|
|
NotFound,
|
|
|
|
PermissionDenied,
|
|
|
|
ConnectionRefused,
|
|
|
|
ConnectionReset,
|
|
|
|
ConnectionAborted,
|
|
|
|
NotConnected,
|
|
|
|
AddrInUse,
|
|
|
|
AddrNotAvailable,
|
|
|
|
BrokenPipe,
|
|
|
|
AlreadyExists,
|
|
|
|
InvalidData,
|
|
|
|
TimedOut,
|
|
|
|
Interrupted,
|
|
|
|
WriteZero,
|
|
|
|
UnexpectedEof,
|
|
|
|
BadResource,
|
|
|
|
Http,
|
|
|
|
Busy,
|
2020-08-25 18:22:15 -04:00
|
|
|
NotSupported,
|
2020-07-19 13:49:44 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
window.__bootstrap.errors = {
|
|
|
|
errors,
|
|
|
|
};
|
|
|
|
})(this);
|