mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
wallet: Catch filesystem_error and raise InitError
This commit is contained in:
parent
1ef57a96b8
commit
fa8527ffec
1 changed files with 6 additions and 1 deletions
|
@ -3972,9 +3972,14 @@ bool CWallet::Verify(std::string wallet_file, bool salvage_wallet, std::string&
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
if (!WalletBatch::VerifyEnvironment(wallet_path, error_string)) {
|
if (!WalletBatch::VerifyEnvironment(wallet_path, error_string)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} catch (const fs::filesystem_error& e) {
|
||||||
|
error_string = strprintf("Error loading wallet %s. %s", wallet_file, e.what());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (salvage_wallet) {
|
if (salvage_wallet) {
|
||||||
// Recover readable keypairs:
|
// Recover readable keypairs:
|
||||||
|
|
Loading…
Add table
Reference in a new issue