diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2018-08-15 23:36:48 -0400 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2018-08-21 15:37:45 -0400 |
| commit | 18d495c7d17cf3fce3835e732094d058f51eddaa (patch) | |
| tree | f7244cfd83dbff9d8aaf67203feb0f3a24fe95f3 /src/msg.fbs | |
| parent | cb1393cdaea4bfbee69efbf7ce86a4adfc4593b3 (diff) | |
Better error handling in src/handlers.rs
Introduces error codes that are shared between JS/RS
Fixes #526.
Diffstat (limited to 'src/msg.fbs')
| -rw-r--r-- | src/msg.fbs | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/src/msg.fbs b/src/msg.fbs index 89ecfec45..d1629ba69 100644 --- a/src/msg.fbs +++ b/src/msg.fbs @@ -1,6 +1,6 @@ namespace deno; -union Any { +union Any { Start, StartRes, CodeFetch, @@ -17,8 +17,47 @@ union Any { WriteFileSync, } +enum ErrorKind: byte { + NoError = 0, + + // io errors + + NotFound, + PermissionDenied, + ConnectionRefused, + ConnectionReset, + ConnectionAborted, + NotConnected, + AddrInUse, + AddrNotAvailable, + BrokenPipe, + AlreadyExists, + WouldBlock, + InvalidInput, + InvalidData, + TimedOut, + Interrupted, + WriteZero, + Other, + UnexpectedEof, + + // url errors + + EmptyHost, + IdnaError, + InvalidPort, + InvalidIpv4Address, + InvalidIpv6Address, + InvalidDomainCharacter, + RelativeUrlWithoutBase, + RelativeUrlWithCannotBeABaseBase, + SetHostOnCannotBeABaseUrl, + Overflow, +} + table Base { cmd_id: uint32; + error_kind: ErrorKind = NoError; error: string; msg: Any; } |
