diff options
-rw-r--r-- | cli/errors.rs | 8 | ||||
-rw-r--r-- | cli/standalone.rs | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/cli/errors.rs b/cli/errors.rs index 29fd428c8..b631f1b71 100644 --- a/cli/errors.rs +++ b/cli/errors.rs @@ -32,6 +32,12 @@ pub(crate) fn get_error_class_name(e: &AnyError) -> &'static str { .map(get_diagnostic_class) }) .unwrap_or_else(|| { - panic!("Error '{}' contains boxed error of unknown type", e); + panic!( + "Error '{}' contains boxed error of unknown type:{}", + e, + e.chain() + .map(|e| format!("\n {:?}", e)) + .collect::<String>() + ); }) } diff --git a/cli/standalone.rs b/cli/standalone.rs index a4b55f081..48a4a28b3 100644 --- a/cli/standalone.rs +++ b/cli/standalone.rs @@ -201,6 +201,12 @@ pub async fn run( fn get_error_class_name(e: &AnyError) -> &'static str { deno_runtime::errors::get_error_class_name(e).unwrap_or_else(|| { - panic!("Error '{}' contains boxed error of unknown type", e); + panic!( + "Error '{}' contains boxed error of unsupported type:{}", + e, + e.chain() + .map(|e| format!("\n {:?}", e)) + .collect::<String>() + ); }) } |