From 9cf3481fc72f0d754935ab71d5c56cbc88b84a73 Mon Sep 17 00:00:00 2001 From: Joseph Lyons Date: Fri, 7 Apr 2023 04:51:43 -0400 Subject: [PATCH] Put backtrace on a new line when reporting panics --- crates/zed/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index 7b4b415620..0e4f15261f 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -336,7 +336,7 @@ fn init_panic_hook(app_version: String) { let message = match info.location() { Some(location) => { format!( - "thread '{}' panicked at '{}': {}:{}{:?}", + "thread '{}' panicked at '{}': {}:{}\n{:?}", thread, payload, location.file(), @@ -345,7 +345,7 @@ fn init_panic_hook(app_version: String) { ) } None => format!( - "thread '{}' panicked at '{}'{:?}", + "thread '{}' panicked at '{}'\n{:?}", thread, payload, backtrace ), };