summaryrefslogtreecommitdiff
path: root/cli/ops/errors.rs
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2020-08-26 00:22:15 +0200
committerGitHub <noreply@github.com>2020-08-26 00:22:15 +0200
commit9bfb0df805719cb3f022a5b5d9f9d898ae954c2e (patch)
tree6c7d62d95fcbde54ebbe1035bdc74618c63cfbc0 /cli/ops/errors.rs
parentd0ccab7fb7dd80030d3765ca9a9af44de6ecda5a (diff)
refactor: remove OpError, use ErrBox everywhere (#7187)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/ops/errors.rs')
-rw-r--r--cli/ops/errors.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/ops/errors.rs b/cli/ops/errors.rs
index 02295d7f8..b9405fe54 100644
--- a/cli/ops/errors.rs
+++ b/cli/ops/errors.rs
@@ -1,11 +1,11 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use super::dispatch_json::{Deserialize, JsonOp, Value};
use crate::diagnostics::Diagnostic;
-use crate::op_error::OpError;
use crate::source_maps::get_orig_position;
use crate::source_maps::CachedMaps;
use crate::state::State;
use deno_core::CoreIsolate;
+use deno_core::ErrBox;
use deno_core::ZeroCopyBuf;
use std::collections::HashMap;
use std::rc::Rc;
@@ -33,7 +33,7 @@ fn op_apply_source_map(
state: &Rc<State>,
args: Value,
_zero_copy: &mut [ZeroCopyBuf],
-) -> Result<JsonOp, OpError> {
+) -> Result<JsonOp, ErrBox> {
let args: ApplySourceMap = serde_json::from_value(args)?;
let mut mappings_map: CachedMaps = HashMap::new();
@@ -57,7 +57,7 @@ fn op_format_diagnostic(
_state: &Rc<State>,
args: Value,
_zero_copy: &mut [ZeroCopyBuf],
-) -> Result<JsonOp, OpError> {
+) -> Result<JsonOp, ErrBox> {
let diagnostic = serde_json::from_value::<Diagnostic>(args)?;
Ok(JsonOp::Sync(json!(diagnostic.to_string())))
}