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 /core/modules.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 'core/modules.rs')
-rw-r--r-- | core/modules.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/modules.rs b/core/modules.rs index 414423be2..294bcfb05 100644 --- a/core/modules.rs +++ b/core/modules.rs @@ -466,7 +466,6 @@ impl Modules { #[cfg(test)] mod tests { use super::*; - use crate::js_check; use crate::JsRuntime; use crate::RuntimeOptions; use futures::future::FutureExt; @@ -654,7 +653,7 @@ mod tests { let a_id_fut = runtime.load_module(&spec, None); let a_id = futures::executor::block_on(a_id_fut).expect("Failed to load"); - js_check(runtime.mod_evaluate(a_id)); + runtime.mod_evaluate(a_id).unwrap(); let l = loads.lock().unwrap(); assert_eq!( l.to_vec(), @@ -721,7 +720,7 @@ mod tests { let result = runtime.load_module(&spec, None).await; assert!(result.is_ok()); let circular1_id = result.unwrap(); - js_check(runtime.mod_evaluate(circular1_id)); + runtime.mod_evaluate(circular1_id).unwrap(); let l = loads.lock().unwrap(); assert_eq!( @@ -798,7 +797,7 @@ mod tests { println!(">> result {:?}", result); assert!(result.is_ok()); let redirect1_id = result.unwrap(); - js_check(runtime.mod_evaluate(redirect1_id)); + runtime.mod_evaluate(redirect1_id).unwrap(); let l = loads.lock().unwrap(); assert_eq!( l.to_vec(), @@ -948,7 +947,7 @@ mod tests { let main_id = futures::executor::block_on(main_id_fut).expect("Failed to load"); - js_check(runtime.mod_evaluate(main_id)); + runtime.mod_evaluate(main_id).unwrap(); let l = loads.lock().unwrap(); assert_eq!( |