Properly report unknown command errors so the command line tool

can give help.
This commit is contained in:
JoelKatz
2012-01-20 17:44:06 -08:00
parent ba6d040266
commit 5196be1645

View File

@@ -78,6 +78,9 @@ int commandLineRPC(int argc, char *argv[])
Json::Value result=reply.get("result", Json::Value());
Json::Value error=reply.get("error", Json::Value());
if(result.isString() && result.asString()=="unknown command")
nRet=1;
if(!error.isNull())
{
// Error