From: Matt Corallo Date: Thu, 11 Aug 2011 11:18:37 +0000 (+0200) Subject: Fix incorrect RPC error messages X-Git-Tag: v0.4.0-unstable~227^2~41^2~1 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=8acb491eef2044443b34e867b91ddb70244cefcf Fix incorrect RPC error messages --- diff --git a/src/rpc.cpp b/src/rpc.cpp index d62a0d9..dd3430d 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -552,7 +552,7 @@ Value sendtoaddress(const Array& params, bool fHelp) CRITICAL_BLOCK(pwalletMain->cs_vMasterKey) { if(pwalletMain->IsLocked()) - throw JSONRPCError(-14, "Error: The wallet passphrase entered was incorrect."); + throw JSONRPCError(-13, "Error: Please enter the wallet passphrase with walletpassphrase first."); string strError = pwalletMain->SendMoneyToBitcoinAddress(address, nAmount, wtx); if (strError != "") @@ -827,7 +827,7 @@ Value sendfrom(const Array& params, bool fHelp) CRITICAL_BLOCK(pwalletMain->cs_vMasterKey) { if(pwalletMain->IsLocked()) - throw JSONRPCError(-14, "Error: The wallet passphrase entered was incorrect."); + throw JSONRPCError(-13, "Error: Please enter the wallet passphrase with walletpassphrase first."); // Check funds int64 nBalance = GetAccountBalance(strAccount, nMinDepth); @@ -894,7 +894,7 @@ Value sendmany(const Array& params, bool fHelp) CRITICAL_BLOCK(pwalletMain->cs_vMasterKey) { if(pwalletMain->IsLocked()) - throw JSONRPCError(-14, "Error: The wallet passphrase entered was incorrect."); + throw JSONRPCError(-13, "Error: Please enter the wallet passphrase with walletpassphrase first."); // Check funds int64 nBalance = GetAccountBalance(strAccount, nMinDepth);