summaryrefslogtreecommitdiff
path: root/cli/errors.rs
diff options
context:
space:
mode:
authorandy finch <andyfinch7@gmail.com>2019-06-13 23:43:54 -0400
committerRyan Dahl <ry@tinyclouds.org>2019-06-13 20:43:54 -0700
commitdc60fe9f300043f191286ef804a365e16e455f87 (patch)
treec6b74e9faa6f26745b8770a18d0ae46ee34f3774 /cli/errors.rs
parentfdd2eb538327ee3f50fe2869320411191830c985 (diff)
Refactor dispatch handling (#2452)
Promise id is now created in core and passed back to JS.
Diffstat (limited to 'cli/errors.rs')
-rw-r--r--cli/errors.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/errors.rs b/cli/errors.rs
index eb0fc7d27..67eb54ea7 100644
--- a/cli/errors.rs
+++ b/cli/errors.rs
@@ -243,6 +243,20 @@ pub fn no_buffer_specified() -> DenoError {
new(ErrorKind::InvalidInput, String::from("no buffer specified"))
}
+pub fn no_async_support() -> DenoError {
+ new(
+ ErrorKind::NoAsyncSupport,
+ String::from("op doesn't support async calls"),
+ )
+}
+
+pub fn no_sync_support() -> DenoError {
+ new(
+ ErrorKind::NoSyncSupport,
+ String::from("op doesn't support sync calls"),
+ )
+}
+
#[derive(Debug)]
pub enum RustOrJsError {
Rust(DenoError),