summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/fmt_errors.rs2
-rw-r--r--cli/source_maps.rs6
2 files changed, 6 insertions, 2 deletions
diff --git a/cli/fmt_errors.rs b/cli/fmt_errors.rs
index b6e44ea07..106ecaaf2 100644
--- a/cli/fmt_errors.rs
+++ b/cli/fmt_errors.rs
@@ -283,7 +283,7 @@ impl fmt::Display for PrettyJsError {
"{}",
&format_stack(
true,
- &self.0.message,
+ &self.0.exception_message,
cause.as_deref(),
self.0.source_line.as_deref(),
self.0.start_column,
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()),