aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Dashjr <[email protected]>2012-11-29 03:35:35 +0000
committerLuke Dashjr <[email protected]>2012-11-29 03:35:35 +0000
commit72c81665897264953ec0ab2b15894aee3432ab81 (patch)
treee8c805343bcf25bdae097cdcd0760da649bdaffc /src
parentMerge branch '0.4.x' into 0.5.x (diff)
parentdo not silently ignore errors on "backupwallet" RPC cmd (diff)
downloaddiscoin-72c81665897264953ec0ab2b15894aee3432ab81.tar.xz
discoin-72c81665897264953ec0ab2b15894aee3432ab81.zip
Merge branch '0.4.x' into 0.5.x
Diffstat (limited to 'src')
-rw-r--r--src/bitcoinrpc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index af75bc44a..373994d43 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -1385,7 +1385,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;
}