mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
fix panics not shown on cli (closes #2049)
This commit is contained in:
parent
f4a7034a9a
commit
f1da79b4b2
1 changed files with 2 additions and 2 deletions
|
|
@ -386,16 +386,16 @@ fn set_panic_handlers() -> Result<()> {
|
||||||
// regular panic handler
|
// regular panic handler
|
||||||
panic::set_hook(Box::new(|e| {
|
panic::set_hook(Box::new(|e| {
|
||||||
let backtrace = Backtrace::new();
|
let backtrace = Backtrace::new();
|
||||||
log_eprintln!("panic: {:?}\ntrace:\n{:?}", e, backtrace);
|
|
||||||
shutdown_terminal();
|
shutdown_terminal();
|
||||||
|
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);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// global threadpool
|
// global threadpool
|
||||||
rayon_core::ThreadPoolBuilder::new()
|
rayon_core::ThreadPoolBuilder::new()
|
||||||
.panic_handler(|e| {
|
.panic_handler(|e| {
|
||||||
let backtrace = Backtrace::new();
|
let backtrace = Backtrace::new();
|
||||||
log_eprintln!("panic: {:?}\ntrace:\n{:?}", e, backtrace);
|
|
||||||
shutdown_terminal();
|
shutdown_terminal();
|
||||||
|
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);
|
||||||
process::abort();
|
process::abort();
|
||||||
})
|
})
|
||||||
.num_threads(4)
|
.num_threads(4)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue