diff --git a/crates/sdk/src/masp/shielded_ctx.rs b/crates/sdk/src/masp/shielded_ctx.rs index 16c22dcf99..80c635f499 100644 --- a/crates/sdk/src/masp/shielded_ctx.rs +++ b/crates/sdk/src/masp/shielded_ctx.rs @@ -1446,6 +1446,21 @@ impl ShieldedContext { let (task_scheduler, mut task_manager) = TaskManager::::new(self.clone()); + { + use std::panic; + + let panic_hook = panic::take_hook(); + + panic::set_hook(Box::new(move |panic_info| { + println!("========================================================="); + println!("========================================================="); + println!("{panic_info}"); + panic_hook(panic_info); + println!("========================================================="); + println!("========================================================="); + })); + } + // The main loop that performs // * fetching and caching MASP txs in sequence // * trial decryption of each note to determine if it is owned by a