summaryrefslogtreecommitdiff
path: root/op_crates/fetch/lib.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-09-22 23:30:03 +0200
committerGitHub <noreply@github.com>2020-09-22 23:30:03 +0200
commit68fd7a927b26c3e72cf73515821450f3aa252014 (patch)
tree61536703a37c1584eef8f69f954418a68f9533f8 /op_crates/fetch/lib.rs
parentcf0c49191e9be862027f74f39318a3479fce3ba2 (diff)
refactor(core): support error stack, remove js_check (#7629)
This commit adds support for stack traces in "deno_core". Implementation of "Display" trait for "JsError" has been updated and in consequence "deno_core::js_check" became obsolete and removed.
Diffstat (limited to 'op_crates/fetch/lib.rs')
-rw-r--r--op_crates/fetch/lib.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/op_crates/fetch/lib.rs b/op_crates/fetch/lib.rs
index 3692f916c..5a314f752 100644
--- a/op_crates/fetch/lib.rs
+++ b/op_crates/fetch/lib.rs
@@ -6,7 +6,6 @@ use deno_core::error::bad_resource_id;
use deno_core::error::type_error;
use deno_core::error::AnyError;
use deno_core::futures;
-use deno_core::js_check;
use deno_core::serde_json;
use deno_core::serde_json::json;
use deno_core::serde_json::Value;
@@ -50,10 +49,12 @@ pub fn init(isolate: &mut JsRuntime) {
println!("cargo:rerun-if-changed={}", file.display());
let display_path = file.strip_prefix(display_root).unwrap();
let display_path_str = display_path.display().to_string();
- js_check(isolate.execute(
- &("deno:".to_string() + &display_path_str.replace('\\', "/")),
- &std::fs::read_to_string(&file).unwrap(),
- ));
+ isolate
+ .execute(
+ &("deno:".to_string() + &display_path_str.replace('\\', "/")),
+ &std::fs::read_to_string(&file).unwrap(),
+ )
+ .unwrap();
}
}