summaryrefslogtreecommitdiff
path: root/cli/js/errors.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-04-15 20:43:19 -0400
committerGitHub <noreply@github.com>2020-04-15 20:43:19 -0400
commitfab0204cbf20cc1be7874266325bf258fe0ecaca (patch)
treec67b3febde254ea36122966aadf13dfb62b67a0e /cli/js/errors.ts
parent7cfd094359f7f94573b084328ad1a956dd70005d (diff)
Make writeSync, readSync, seekSync, openSync, isatty proper synchronous syscalls (#4762)
Diffstat (limited to 'cli/js/errors.ts')
-rw-r--r--cli/js/errors.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/js/errors.ts b/cli/js/errors.ts
index fc4021321..69afcf148 100644
--- a/cli/js/errors.ts
+++ b/cli/js/errors.ts
@@ -23,6 +23,7 @@ export enum ErrorKind {
URIError = 20,
TypeError = 21,
Other = 22,
+ Busy = 23,
}
export function getErrorClass(kind: ErrorKind): { new (msg: string): Error } {
@@ -67,6 +68,8 @@ export function getErrorClass(kind: ErrorKind): { new (msg: string): Error } {
return BadResource;
case ErrorKind.Http:
return Http;
+ case ErrorKind.Busy:
+ return Busy;
}
}
@@ -172,6 +175,12 @@ class Http extends Error {
this.name = "Http";
}
}
+class Busy extends Error {
+ constructor(msg: string) {
+ super(msg);
+ this.name = "Busy";
+ }
+}
export const errors = {
NotFound: NotFound,
@@ -191,4 +200,5 @@ export const errors = {
UnexpectedEof: UnexpectedEof,
BadResource: BadResource,
Http: Http,
+ Busy: Busy,
};