aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-08-04 12:14:28 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-08-04 12:04:38 -0400
commitfa8527ffeced3f898e8f205483ef0ea7c51a9178 (patch)
tree8e0ae2c0b803195bed7a9b700ac6877fbd356ad3 /src/wallet
parent1ef57a96b8b7255bd1f1ea0583846f18305419bf (diff)
wallet: Catch filesystem_error and raise InitError
Diffstat (limited to 'src/wallet')
-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;
}