From: Matt Corallo Date: Wed, 20 Mar 2024 20:40:41 +0000 (+0000) Subject: Debug more information when we fail to find a lock call symbol X-Git-Tag: v0.0.123-beta~16^2~7 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=fb3a86f498f971dc01fdd58b166031793ff1bc1a;p=rust-lightning Debug more information when we fail to find a lock call symbol --- diff --git a/lightning/src/sync/debug_sync.rs b/lightning/src/sync/debug_sync.rs index 2b75e095..5968a79e 100644 --- a/lightning/src/sync/debug_sync.rs +++ b/lightning/src/sync/debug_sync.rs @@ -103,7 +103,9 @@ fn locate_call_symbol(backtrace: &Backtrace) -> (String, Option) { } } } - let symbol = symbol_after_latest_debug_sync.expect("Couldn't find lock call symbol"); + let symbol = symbol_after_latest_debug_sync.unwrap_or_else(|| { + panic!("Couldn't find lock call symbol in trace {:?}", backtrace); + }); (format!("{}:{}", symbol.filename().unwrap().display(), symbol.lineno().unwrap()), symbol.colno()) }