Skip to content

Commit fa8527f

Browse files
author
MarcoFalke
committed
wallet: Catch filesystem_error and raise InitError
1 parent 1ef57a9 commit fa8527f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/wallet/wallet.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3972,7 +3972,12 @@ bool CWallet::Verify(std::string wallet_file, bool salvage_wallet, std::string&
39723972
}
39733973
}
39743974

3975-
if (!WalletBatch::VerifyEnvironment(wallet_path, error_string)) {
3975+
try {
3976+
if (!WalletBatch::VerifyEnvironment(wallet_path, error_string)) {
3977+
return false;
3978+
}
3979+
} catch (const fs::filesystem_error& e) {
3980+
error_string = strprintf("Error loading wallet %s. %s", wallet_file, e.what());
39763981
return false;
39773982
}
39783983

0 commit comments

Comments
 (0)