summaryrefslogtreecommitdiff
path: root/cli/deno_error.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-08-24 13:20:48 -0700
committerGitHub <noreply@github.com>2019-08-24 13:20:48 -0700
commit2235dd795d3cc6c24ff1bdd1bbdcd110b4b0bdfc (patch)
treea5811adc062cbb1c66f05c863c9be245cf4fd2d2 /cli/deno_error.rs
parentbdc0a13261deaa3748f51d9948b4e7b92864c324 (diff)
Revert json ops (#2814)
* Revert "port more ops to JSON (#2809)" This reverts commit 137f33733d365026903d40e7cde6e34ac6c36dcf. * Revert "port ops to JSON: compiler, errors, fetch, files (#2804)" This reverts commit 79f82cf10ed1dbf91346994250d7311a4d74377a. * Revert "Port rest of os ops to JSON (#2802)" This reverts commit 5b2baa5c990fbeae747e952c5dcd7a5369e950b1.
Diffstat (limited to 'cli/deno_error.rs')
-rw-r--r--cli/deno_error.rs17
1 files changed, 0 insertions, 17 deletions
diff --git a/cli/deno_error.rs b/cli/deno_error.rs
index 3b7dbcde8..e024a396c 100644
--- a/cli/deno_error.rs
+++ b/cli/deno_error.rs
@@ -205,18 +205,6 @@ impl GetErrorKind for ReadlineError {
}
}
-impl GetErrorKind for serde_json::error::Error {
- fn kind(&self) -> ErrorKind {
- use serde_json::error::*;
- match self.classify() {
- Category::Io => ErrorKind::InvalidInput,
- Category::Syntax => ErrorKind::InvalidInput,
- Category::Data => ErrorKind::InvalidData,
- Category::Eof => ErrorKind::UnexpectedEof,
- }
- }
-}
-
#[cfg(unix)]
mod unix {
use super::{ErrorKind, GetErrorKind};
@@ -263,11 +251,6 @@ impl GetErrorKind for dyn AnyError {
.or_else(|| self.downcast_ref::<uri::InvalidUri>().map(Get::kind))
.or_else(|| self.downcast_ref::<url::ParseError>().map(Get::kind))
.or_else(|| self.downcast_ref::<ReadlineError>().map(Get::kind))
- .or_else(|| {
- self
- .downcast_ref::<serde_json::error::Error>()
- .map(Get::kind)
- })
.or_else(|| unix_error_kind(self))
.unwrap_or_else(|| {
panic!("Can't get ErrorKind for {:?}", self);