Skip to content

Commit

Permalink
add more panic info to gui
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed Dec 10, 2024
1 parent 128a5dd commit 439aec7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/ferrite-gui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ pub fn run(args: &Args, rx: mpsc::Receiver<LogMessage>) -> Result<()> {
std::panic::set_hook(Box::new(move |info| {
println!();
let _ = std::fs::write("./panic.txt", format!("{info:?}"));
default_panic(info);
let backtrace = std::backtrace::Backtrace::force_capture();
let panic_info = format!("{backtrace}\n{info}");
let _ = std::fs::write("panic.txt", &panic_info);
println!("{}", panic_info);
}));
}

Expand Down

0 comments on commit 439aec7

Please sign in to comment.