summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-11-07 15:33:56 +0100
committerGitHub <noreply@github.com>2021-11-07 15:33:56 +0100
commit0f8299d011420408b9a432a2c01af387af9d5fb2 (patch)
treea00012efc8c3d2fdd0a0234cc95a62f2b4251c55 /cli
parented761bf83f47c706d345622eda0920fdbab94787 (diff)
fix(cli): don't panic when mapping unknown errors (#12659)
Instead fallback to generic "Error" class, fixes #12590, also update WPT expectations
Diffstat (limited to 'cli')
-rw-r--r--cli/errors.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/errors.rs b/cli/errors.rs
index b09c3c01a..bd5793430 100644
--- a/cli/errors.rs
+++ b/cli/errors.rs
@@ -70,12 +70,13 @@ pub(crate) fn get_error_class_name(e: &AnyError) -> &'static str {
.map(get_resolution_error_class)
})
.unwrap_or_else(|| {
- panic!(
+ eprintln!(
"Error '{}' contains boxed error of unknown type:{}",
e,
e.chain()
.map(|e| format!("\n {:?}", e))
.collect::<String>()
);
+ "Error"
})
}