diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-01-20 16:50:16 +0100 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2020-01-20 10:50:16 -0500 |
commit | c90036ab88bb1ae6b9c87d5e368f56d8c8afab69 (patch) | |
tree | ebc7b762151489440135c029a1217c80bb810900 /cli/msg.rs | |
parent | e83658138bff3605bd37c2b4ae4703081d884729 (diff) |
refactor: reduce number of ErrorKind variants (#3662)
Diffstat (limited to 'cli/msg.rs')
-rw-r--r-- | cli/msg.rs | 45 |
1 files changed, 9 insertions, 36 deletions
diff --git a/cli/msg.rs b/cli/msg.rs index e1d0f07f2..643c63869 100644 --- a/cli/msg.rs +++ b/cli/msg.rs @@ -6,7 +6,6 @@ #[repr(i8)] #[derive(Clone, Copy, PartialEq, Debug)] pub enum ErrorKind { - NoError = 0, NotFound = 1, PermissionDenied = 2, ConnectionRefused = 3, @@ -26,41 +25,15 @@ pub enum ErrorKind { 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, - TypeError = 51, - - /** TODO this is a DomException type, and should be moved out of here when possible */ - DataCloneError = 52, + UrlParse = 20, + Http = 21, + TooLarge = 22, + InvalidSeekMode = 23, + UnixError = 24, + InvalidPath = 25, + ImportPrefixMissing = 26, + Diagnostic = 27, + JSError = 28, } // Warning! The values in this enum are duplicated in js/compiler.ts |