mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03: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)) {
|
||||
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) {
|
||||
// Recover readable keypairs:
|
||||
|
|
Loading…
Reference in a new issue