From dfc25a6bb9cb9bcb94ed4f3fb1b8dbf878caae2b Mon Sep 17 00:00:00 2001 From: Christian Poveda Ruiz <31802960+pvdrz@users.noreply.github.com> Date: Mon, 24 Oct 2022 11:52:46 -0500 Subject: [PATCH] Avoid suppressing panic messages (#2323) * print `PanicInfo` using hook * update changelog --- CHANGELOG.md | 1 + bindgen-cli/main.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87a74acd..de08d829 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -153,6 +153,7 @@ * Regex inputs are sanitized so alternation (`a|b`) is handled correctly but wildcard patterns (`*`) are now considered invalid. + * the `ParseCallbacks`trait does not require to implement `UnwindSafe`. ## Removed diff --git a/bindgen-cli/main.rs b/bindgen-cli/main.rs index fed454af..a3b36126 100644 --- a/bindgen-cli/main.rs +++ b/bindgen-cli/main.rs @@ -41,10 +41,11 @@ pub fn main() { #[cfg(feature = "logging")] clang_version_check(); - std::panic::set_hook(Box::new(move |_info| { + std::panic::set_hook(Box::new(move |info| { if verbose { print_verbose_err() } + println!("{}", info); })); let bindings =