diff options
| author | MarcoFalke <[email protected]> | 2018-08-09 08:03:17 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2018-08-09 08:03:23 -0400 |
| commit | 8eb987005288e9c13d46b2f6b5bf5c3aaddd8b06 (patch) | |
| tree | 7dea02f33b544dc14c09e424fca31b522086b60e /src | |
| parent | Merge #13894: shutdown: Stop threads before resetting ptrs (diff) | |
| parent | wallet: Catch filesystem_error and raise InitError (diff) | |
| download | discoin-8eb987005288e9c13d46b2f6b5bf5c3aaddd8b06.tar.xz discoin-8eb987005288e9c13d46b2f6b5bf5c3aaddd8b06.zip | |
Merge #13876: wallet: Catch filesystem_error and raise InitError
fa8527ffec wallet: Catch filesystem_error and raise InitError (MarcoFalke)
Pull request description:
Fixes #13754 by restoring the previous behaviour
Tree-SHA512: f64052e89f6b332be395df2a5ea6f227c213fa2f38e415e83f30a4fad0938e947e5cddff7902368a43c07be135955a31b90f7eac5a46875c58d54ea95f87f6e6
Diffstat (limited to 'src')
| -rw-r--r-- | src/wallet/wallet.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d4aed3b50..b0c5200c7 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3982,7 +3982,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; } |