diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2022-04-27 00:06:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-27 01:06:10 +0200 |
commit | 9853c96cc4686a6cd1ffa1e9081c012b8df72ff7 (patch) | |
tree | c631ebfc363c06c468367be7ecd5b98110dde3a0 /cli/tools | |
parent | 58eab0e2b37fd8c3c83445196d4bde419740373d (diff) |
refactor: Remove PrettyJsError and js_error_create_fn (#14378)
This commit:
- removes "fmt_errors::PrettyJsError" in favor of "format_js_error" fn
- removes "deno_core::JsError::create" and
"deno_core::RuntimeOptions::js_error_create_fn"
- adds new option to "deno_runtime::ops::worker_host::init"
Diffstat (limited to 'cli/tools')
-rw-r--r-- | cli/tools/test.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/tools/test.rs b/cli/tools/test.rs index 5eb3552ec..9a84774bf 100644 --- a/cli/tools/test.rs +++ b/cli/tools/test.rs @@ -13,7 +13,7 @@ use crate::file_watcher::ResolutionResult; use crate::flags::Flags; use crate::flags::TestFlags; use crate::flags::TypeCheckMode; -use crate::fmt_errors::PrettyJsError; +use crate::fmt_errors::format_js_error; use crate::fs_util::collect_specifiers; use crate::fs_util::is_supported_test_ext; use crate::fs_util::is_supported_test_path; @@ -557,8 +557,8 @@ fn abbreviate_test_error(js_error: &JsError) -> JsError { js_error } -// This function maps JsError to PrettyJsError and applies some changes -// specifically for test runner purposes: +// This function prettifies `JsError` and applies some changes specifically for +// test runner purposes: // // - filter out stack frames: // - if stack trace consists of mixed user and internal code, the frames @@ -570,7 +570,7 @@ pub fn format_test_error(js_error: &JsError) -> String { .exception_message .trim_start_matches("Uncaught ") .to_string(); - PrettyJsError::create(js_error).to_string() + format_js_error(&js_error) } fn create_reporter( |