mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 18:52:29 +02:00
wallet: Improve log output for errors during load
When loading the wallet, display the entire path in error messages, instead of the name (which, for the default wallet, is the empty string.) When an exception occurs during wallet loading, display e.what() if possible, instead of nothing.
This commit is contained in:
@@ -422,8 +422,15 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
|
||||
strType != "minversion" && strType != "acentry") {
|
||||
wss.m_unknown_records++;
|
||||
}
|
||||
} catch (...)
|
||||
{
|
||||
} catch (const std::exception& e) {
|
||||
if (strErr.empty()) {
|
||||
strErr = e.what();
|
||||
}
|
||||
return false;
|
||||
} catch (...) {
|
||||
if (strErr.empty()) {
|
||||
strErr = "Caught unknown exception in ReadKeyValue";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user