projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d639da9
)
Debug more information when we fail to find a lock call symbol
author
Matt Corallo
<git@bluematt.me>
Wed, 20 Mar 2024 20:40:41 +0000
(20:40 +0000)
committer
Matt Corallo
<git@bluematt.me>
Fri, 5 Apr 2024 09:05:26 +0000
(09:05 +0000)
lightning/src/sync/debug_sync.rs
patch
|
blob
|
history
diff --git
a/lightning/src/sync/debug_sync.rs
b/lightning/src/sync/debug_sync.rs
index 2b75e095380ec09f22d07d4d1bd636dd93e53c61..5968a79ee4daa50439a3cac96478c49d3803458b 100644
(file)
--- 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<u32>) {
}
}
}
- 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())
}