Skip to content

Commit f1da79b

Browse files
committed
fix panics not shown on cli (closes #2049)
1 parent f4a7034 commit f1da79b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -386,16 +386,16 @@ fn set_panic_handlers() -> Result<()> {
386386
// regular panic handler
387387
panic::set_hook(Box::new(|e| {
388388
let backtrace = Backtrace::new();
389-
log_eprintln!("panic: {:?}\ntrace:\n{:?}", e, backtrace);
390389
shutdown_terminal();
390+
log_eprintln!("\nGitUI was close due to an unexpected panic.\nPlease file an issue on https://github.com/extrawurst/gitui/issues with the following info:\n\n{:?}\ntrace:\n{:?}", e, backtrace);
391391
}));
392392

393393
// global threadpool
394394
rayon_core::ThreadPoolBuilder::new()
395395
.panic_handler(|e| {
396396
let backtrace = Backtrace::new();
397-
log_eprintln!("panic: {:?}\ntrace:\n{:?}", e, backtrace);
398397
shutdown_terminal();
398+
log_eprintln!("\nGitUI was close due to an unexpected panic.\nPlease file an issue on https://github.com/extrawurst/gitui/issues with the following info:\n\n{:?}\ntrace:\n{:?}", e, backtrace);
399399
process::abort();
400400
})
401401
.num_threads(4)

0 commit comments

Comments
 (0)