aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wallet/wallet.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 218684fdf1..99e561cb9a 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;
}