diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 218684fdf..99e561cb9 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -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; }