Skip to content

Commit 8eb9870

Browse files
author
MarcoFalke
committed
Merge #13876: wallet: Catch filesystem_error and raise InitError
fa8527f wallet: Catch filesystem_error and raise InitError (MarcoFalke) Pull request description: Fixes #13754 by restoring the previous behaviour Tree-SHA512: f64052e89f6b332be395df2a5ea6f227c213fa2f38e415e83f30a4fad0938e947e5cddff7902368a43c07be135955a31b90f7eac5a46875c58d54ea95f87f6e6
2 parents df9f712 + fa8527f commit 8eb9870

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
@@ -3982,7 +3982,12 @@ bool CWallet::Verify(std::string wallet_file, bool salvage_wallet, std::string&
39823982
}
39833983
}
39843984

3985-
if (!WalletBatch::VerifyEnvironment(wallet_path, error_string)) {
3985+
try {
3986+
if (!WalletBatch::VerifyEnvironment(wallet_path, error_string)) {
3987+
return false;
3988+
}
3989+
} catch (const fs::filesystem_error& e) {
3990+
error_string = strprintf("Error loading wallet %s. %s", wallet_file, e.what());
39863991
return false;
39873992
}
39883993

0 commit comments

Comments
 (0)