summaryrefslogtreecommitdiff
path: root/cli/js.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 /cli/js.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 'cli/js.rs')
-rw-r--r--cli/js.rs20
1 files changed, 12 insertions, 8 deletions
diff --git a/cli/js.rs b/cli/js.rs
index ef6d6c7e8..beb8df192 100644
--- a/cli/js.rs
+++ b/cli/js.rs
@@ -34,15 +34,17 @@ fn cli_snapshot() {
startup_snapshot: Some(deno_isolate_init()),
..Default::default()
});
- deno_core::js_check(isolate.execute(
- "<anon>",
- r#"
+ isolate
+ .execute(
+ "<anon>",
+ r#"
if (!(bootstrap.mainRuntime && bootstrap.workerRuntime)) {
throw Error("bad");
}
console.log("we have console.log!!!");
"#,
- ));
+ )
+ .unwrap();
}
#[test]
@@ -51,13 +53,15 @@ fn compiler_snapshot() {
startup_snapshot: Some(compiler_isolate_init()),
..Default::default()
});
- deno_core::js_check(isolate.execute(
- "<anon>",
- r#"
+ isolate
+ .execute(
+ "<anon>",
+ r#"
if (!(bootstrapCompilerRuntime)) {
throw Error("bad");
}
console.log(`ts version: ${ts.version}`);
"#,
- ));
+ )
+ .unwrap();
}