aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rpcwallet.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 9e914f336d..0d59fa364e 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1195,7 +1195,8 @@ Value backupwallet(const Array& params, bool fHelp)
"Safely copies wallet.dat to destination, which can be a directory or a path with filename.");
string strDest = params[0].get_str();
- BackupWallet(*pwalletMain, strDest);
+ if (!BackupWallet(*pwalletMain, strDest))
+ throw JSONRPCError(RPC_WALLET_ERROR, "Error: Wallet backup failed!");
return Value::null;
}