diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-09-22 23:30:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-22 23:30:03 +0200 |
commit | 68fd7a927b26c3e72cf73515821450f3aa252014 (patch) | |
tree | 61536703a37c1584eef8f69f954418a68f9533f8 /cli/js.rs | |
parent | cf0c49191e9be862027f74f39318a3479fce3ba2 (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.rs | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -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(); } |