fix tracking of panic locations
@@ -82,7 +82,6 @@ pub fn register_pg_guard_panic_handler() {
}
std::panic::set_hook(Box::new(|info| {
- if cfg!(debug_assertions) {
#[cfg(debug_assertions)]
{
if IS_MAIN_THREAD.with(|v| v.get().is_none()) {
@@ -97,7 +96,7 @@ pub fn register_pg_guard_panic_handler() {
);
}
}
- } else {
+
PANIC_LOCATION.with(|p| {
let existing = p.take();
@@ -114,7 +113,6 @@ pub fn register_pg_guard_panic_handler() {
existing
})
});
- }
}))
}
