Skip to content

Commit 864aabf

Browse files
authored
Merge pull request #44 from alpire/master
Run default panic hook before aborting
2 parents ff32cf5 + 351e3c7 commit 864aabf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ pub fn initialize(_argc: *const isize, _argv: *const *const *const u8) -> isize
3030
// impossible to build code using compiler plugins with this flag.
3131
// We will be able to remove this code when
3232
// https://github.com/rust-lang/cargo/issues/5423 is fixed.
33-
::std::panic::set_hook(Box::new(|_| {
33+
let default_hook = ::std::panic::take_hook();
34+
::std::panic::set_hook(Box::new(move |panic_info| {
35+
default_hook(panic_info);
3436
::std::process::abort();
3537
}));
3638
0

0 commit comments

Comments
 (0)