mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Co-authored-by: Nicholas Schwab <git@nicholas-schwab.de> Co-authored-by: sxyazi <sxyazi@gmail.com>
17 lines
259 B
Rust
17 lines
259 B
Rust
use crate::Term;
|
|
|
|
pub(super) struct Panic;
|
|
|
|
impl Panic {
|
|
pub(super) fn install() {
|
|
better_panic::install();
|
|
|
|
let hook = std::panic::take_hook();
|
|
std::panic::set_hook(Box::new(move |info| {
|
|
Term::goodbye(|| {
|
|
hook(info);
|
|
1
|
|
});
|
|
}));
|
|
}
|
|
}
|