mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-19 05:45:05 +01:00
wallet: Catch filesystem_error and raise InitError
This commit is contained in:
parent
1ef57a96b8
commit
fa8527ffec
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user