Fix incorrect RPC error messages
This commit is contained in:
parent
2f8f51d1e4
commit
8acb491eef
1 changed files with 3 additions and 3 deletions
|
@ -552,7 +552,7 @@ Value sendtoaddress(const Array& params, bool fHelp)
|
||||||
CRITICAL_BLOCK(pwalletMain->cs_vMasterKey)
|
CRITICAL_BLOCK(pwalletMain->cs_vMasterKey)
|
||||||
{
|
{
|
||||||
if(pwalletMain->IsLocked())
|
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);
|
string strError = pwalletMain->SendMoneyToBitcoinAddress(address, nAmount, wtx);
|
||||||
if (strError != "")
|
if (strError != "")
|
||||||
|
@ -827,7 +827,7 @@ Value sendfrom(const Array& params, bool fHelp)
|
||||||
CRITICAL_BLOCK(pwalletMain->cs_vMasterKey)
|
CRITICAL_BLOCK(pwalletMain->cs_vMasterKey)
|
||||||
{
|
{
|
||||||
if(pwalletMain->IsLocked())
|
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
|
// Check funds
|
||||||
int64 nBalance = GetAccountBalance(strAccount, nMinDepth);
|
int64 nBalance = GetAccountBalance(strAccount, nMinDepth);
|
||||||
|
@ -894,7 +894,7 @@ Value sendmany(const Array& params, bool fHelp)
|
||||||
CRITICAL_BLOCK(pwalletMain->cs_vMasterKey)
|
CRITICAL_BLOCK(pwalletMain->cs_vMasterKey)
|
||||||
{
|
{
|
||||||
if(pwalletMain->IsLocked())
|
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
|
// Check funds
|
||||||
int64 nBalance = GetAccountBalance(strAccount, nMinDepth);
|
int64 nBalance = GetAccountBalance(strAccount, nMinDepth);
|
||||||
|
|
Loading…
Reference in a new issue