diff options
| author | Philip Kaufmann <[email protected]> | 2012-11-27 16:27:54 +0100 |
|---|---|---|
| committer | Philip Kaufmann <[email protected]> | 2012-11-27 16:27:54 +0100 |
| commit | ad525e9c8fa2b15f1afe6b7284de638a090e891a (patch) | |
| tree | 40927c168d17f30d2a206c6b28237f8e05f9e088 /src/rpcwallet.cpp | |
| parent | Merge pull request #2004 from alexanderkjeldaas/simplify-cmutexlock (diff) | |
| download | discoin-ad525e9c8fa2b15f1afe6b7284de638a090e891a.tar.xz discoin-ad525e9c8fa2b15f1afe6b7284de638a090e891a.zip | |
do not silently ignore errors on "backupwallet" RPC cmd
Diffstat (limited to 'src/rpcwallet.cpp')
| -rw-r--r-- | src/rpcwallet.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 5ebab755b..d597e5e3f 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -1228,7 +1228,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; } |