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,7 +3972,12 @@ bool CWallet::Verify(std::string wallet_file, bool salvage_wallet, std::string&
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!WalletBatch::VerifyEnvironment(wallet_path, error_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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue