mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-03 19:51:32 +02:00
wallet: loading, log descriptor parsing error details
The `UNKNOWN_DESCRIPTOR` error comes from the `WalletDescriptor::DeserializeDescriptor` std::ios_base exception, which contains further information about the parsing error.
This commit is contained in:
parent
79e8247ddb
commit
286e0c7d5e
@ -794,11 +794,13 @@ static DBErrors LoadDescriptorWalletRecords(CWallet* pwallet, DatabaseBatch& bat
|
||||
WalletDescriptor desc;
|
||||
try {
|
||||
value >> desc;
|
||||
} catch (const std::ios_base::failure&) {
|
||||
} catch (const std::ios_base::failure& e) {
|
||||
strErr = strprintf("Error: Unrecognized descriptor found in wallet %s. ", pwallet->GetName());
|
||||
strErr += (last_client > CLIENT_VERSION) ? "The wallet might had been created on a newer version. " :
|
||||
"The database might be corrupted or the software version is not compatible with one of your wallet descriptors. ";
|
||||
strErr += "Please try running the latest software version";
|
||||
// Also include error details
|
||||
strErr = strprintf("%s\nDetails: %s", strErr, e.what());
|
||||
return DBErrors::UNKNOWN_DESCRIPTOR;
|
||||
}
|
||||
pwallet->LoadDescriptorScriptPubKeyMan(id, desc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user