From fb3a86f498f971dc01fdd58b166031793ff1bc1a Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 20 Mar 2024 20:40:41 +0000 Subject: [PATCH] Debug more information when we fail to find a lock call symbol --- lightning/src/sync/debug_sync.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lightning/src/sync/debug_sync.rs b/lightning/src/sync/debug_sync.rs index 2b75e0953..5968a79ee 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()) } -- 2.39.5