Skip to content

Commit a061d71

Browse files
committed
Debug more information when we fail to find a lock call symbol
1 parent b510535 commit a061d71

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lightning/src/sync/debug_sync.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ fn locate_call_symbol(backtrace: &Backtrace) -> (String, Option<u32>) {
103103
}
104104
}
105105
}
106-
let symbol = symbol_after_latest_debug_sync.expect("Couldn't find lock call symbol");
106+
let symbol = symbol_after_latest_debug_sync.unwrap_or_else(|| {
107+
panic!("Couldn't find lock call symbol in trace {:?}", backtrace);
108+
});
107109
(format!("{}:{}", symbol.filename().unwrap().display(), symbol.lineno().unwrap()), symbol.colno())
108110
}
109111

0 commit comments

Comments
 (0)