mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
Revert json ops (#2814)
* Revert "port more ops to JSON (#2809)" This reverts commit137f33733d
. * Revert "port ops to JSON: compiler, errors, fetch, files (#2804)" This reverts commit79f82cf10e
. * Revert "Port rest of os ops to JSON (#2802)" This reverts commit5b2baa5c99
.
This commit is contained in:
parent
bdc0a13261
commit
2235dd795d
45 changed files with 1968 additions and 1045 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue