diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2022-04-13 15:41:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-13 16:41:39 +0200 |
commit | 7d50a5fd4342969d261017b7a6dd0d0528e99a77 (patch) | |
tree | b9aa868213c082e189c6529351e195dee3f8a8aa /cli/source_maps.rs | |
parent | c03fbb3c1f58868e079a9bf21f8351ad599ea7b5 (diff) |
refactor(core/error): Clarify JsError message fields (#14269)
Diffstat (limited to 'cli/source_maps.rs')
-rw-r--r-- | cli/source_maps.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/source_maps.rs b/cli/source_maps.rs index 80d97f1b9..d92caf7f4 100644 --- a/cli/source_maps.rs +++ b/cli/source_maps.rs @@ -85,7 +85,9 @@ pub fn apply_source_map<G: SourceMapGetter>( .map(|cause| Box::new(apply_source_map(&*cause, getter))); JsError { + name: js_error.name.clone(), message: js_error.message.clone(), + exception_message: js_error.exception_message.clone(), cause, source_line, script_resource_name, @@ -243,7 +245,9 @@ mod tests { #[test] fn apply_source_map_line() { let e = JsError { - message: "TypeError: baz".to_string(), + name: Some("TypeError".to_string()), + message: Some("baz".to_string()), + exception_message: "TypeError: baz".to_string(), cause: None, source_line: Some("foo".to_string()), script_resource_name: Some("foo_bar.ts".to_string()), |