diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-08-26 17:02:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-26 17:02:34 -0400 |
commit | f94900406d52a9d0a432ae9ebef65d46092afb41 (patch) | |
tree | 0a12b3201f8bdd0bbee1b6b1abf3f413d7d92e9f /js/errors.ts | |
parent | d8ada4d3fcc5dfe7f76103399a1d765fbab2ee45 (diff) |
Remove flatbuffers (#2818)
Diffstat (limited to 'js/errors.ts')
-rw-r--r-- | js/errors.ts | 58 |
1 files changed, 56 insertions, 2 deletions
diff --git a/js/errors.ts b/js/errors.ts index 717015589..02ddfa2f2 100644 --- a/js/errors.ts +++ b/js/errors.ts @@ -1,6 +1,4 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -import { ErrorKind } from "gen/cli/msg_generated"; -export { ErrorKind } from "gen/cli/msg_generated"; /** A Deno specific error. The `kind` property is set to a specific error code * which can be used to in application logic. @@ -23,3 +21,59 @@ export class DenoError<T extends ErrorKind> extends Error { this.name = ErrorKind[kind]; } } + +// Warning! The values in this enum are duplicated in cli/msg.rs +// Update carefully! +export enum ErrorKind { + NoError = 0, + NotFound = 1, + PermissionDenied = 2, + ConnectionRefused = 3, + ConnectionReset = 4, + ConnectionAborted = 5, + NotConnected = 6, + AddrInUse = 7, + AddrNotAvailable = 8, + BrokenPipe = 9, + AlreadyExists = 10, + WouldBlock = 11, + InvalidInput = 12, + InvalidData = 13, + TimedOut = 14, + Interrupted = 15, + WriteZero = 16, + Other = 17, + UnexpectedEof = 18, + BadResource = 19, + CommandFailed = 20, + EmptyHost = 21, + IdnaError = 22, + InvalidPort = 23, + InvalidIpv4Address = 24, + InvalidIpv6Address = 25, + InvalidDomainCharacter = 26, + RelativeUrlWithoutBase = 27, + RelativeUrlWithCannotBeABaseBase = 28, + SetHostOnCannotBeABaseUrl = 29, + Overflow = 30, + HttpUser = 31, + HttpClosed = 32, + HttpCanceled = 33, + HttpParse = 34, + HttpOther = 35, + TooLarge = 36, + InvalidUri = 37, + InvalidSeekMode = 38, + OpNotAvailable = 39, + WorkerInitFailed = 40, + UnixError = 41, + NoAsyncSupport = 42, + NoSyncSupport = 43, + ImportMapError = 44, + InvalidPath = 45, + ImportPrefixMissing = 46, + UnsupportedFetchScheme = 47, + TooManyRedirects = 48, + Diagnostic = 49, + JSError = 50 +} |