do not silently ignore errors on "backupwallet" RPC cmd
This commit is contained in:
1 parent
3ed1ccb089
commit
ad525e9c8f
1 file changed
+2
-1
+2
-1
@@ -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.");
|
"Safely copies wallet.dat to destination, which can be a directory or a path with filename.");
|
||||||
|
|
||||||
string strDest = params[0].get_str();
|
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;
|
return Value::null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user