diff options
author | andy finch <andyfinch7@gmail.com> | 2019-06-17 21:02:08 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-17 18:02:08 -0700 |
commit | 76d51b0f9a4bd0ff86150d0dfa78df7c8410b7ea (patch) | |
tree | ee707fcac13634d999e39168702c4c51d429ebff /cli/errors.rs | |
parent | 9ad5b0653e3821915d7ab7438d5ed4fe373c569a (diff) |
refactor dispatch take 2 (#2533)
Diffstat (limited to 'cli/errors.rs')
-rw-r--r-- | cli/errors.rs | 14 |
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), |