summaryrefslogtreecommitdiff
path: root/cli/errors.rs
diff options
context:
space:
mode:
authorandy finch <andyfinch7@gmail.com>2019-04-01 15:09:59 -0400
committerRyan Dahl <ry@tinyclouds.org>2019-04-01 15:09:59 -0400
commitb0a23beb8fae964be3cdd8c23c38af66257d34c7 (patch)
tree8f7875c8ca059dfb0a3ade4da7bfb94e57d6e1aa /cli/errors.rs
parent659acadf77fdbeef8579a37839a464feb408437a (diff)
Add web worker JS API (#1993)
* Refactored the way worker polling is scheduled and errors are handled. * Share the worker future as a Shared
Diffstat (limited to 'cli/errors.rs')
-rw-r--r--cli/errors.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/cli/errors.rs b/cli/errors.rs
index a2c3c3441..3873f70ff 100644
--- a/cli/errors.rs
+++ b/cli/errors.rs
@@ -180,7 +180,15 @@ pub fn permission_denied() -> DenoError {
}
pub fn op_not_implemented() -> DenoError {
- new(ErrorKind::BadResource, String::from("op not implemented"))
+ new(ErrorKind::OpNotAvaiable, String::from("op not implemented"))
+}
+
+pub fn worker_init_failed() -> DenoError {
+ // TODO(afinch7) pass worker error data through here
+ new(
+ ErrorKind::WorkerInitFailed,
+ String::from("worker init failed"),
+ )
}
#[derive(Debug)]