diff options
Diffstat (limited to 'cli/tools')
-rw-r--r-- | cli/tools/repl/mod.rs | 2 | ||||
-rw-r--r-- | cli/tools/repl/session.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cli/tools/repl/mod.rs b/cli/tools/repl/mod.rs index 0a6d9b9e9..59b79ce86 100644 --- a/cli/tools/repl/mod.rs +++ b/cli/tools/repl/mod.rs @@ -70,7 +70,7 @@ async fn read_line_and_poll( let exception_details = params.get("exceptionDetails").unwrap().as_object().unwrap(); let text = exception_details.get("text").unwrap().as_str().unwrap(); let exception = exception_details.get("exception").unwrap().as_object().unwrap(); - let description = exception.get("description").unwrap().as_str().unwrap(); + let description = exception.get("description").and_then(|d| d.as_str()).unwrap_or("undefined"); println!("{text} {description}"); } } diff --git a/cli/tools/repl/session.rs b/cli/tools/repl/session.rs index 6f8db6fcd..b8daf505b 100644 --- a/cli/tools/repl/session.rs +++ b/cli/tools/repl/session.rs @@ -260,7 +260,7 @@ impl ReplSession { let description = match exception_details.exception { Some(exception) => exception .description - .unwrap_or_else(|| "Unknown exception".to_string()), + .unwrap_or_else(|| "undefined".to_string()), None => "Unknown exception".to_string(), }; EvaluationOutput::Error(format!( |