Put RPC commands in a try catch.

This commit is contained in:
Arthur Britto
2012-10-03 20:29:44 -07:00
parent fca0f6fffc
commit 437ab7b6ae

View File

@@ -2729,7 +2729,13 @@ Json::Value RPCServer::doCommand(const std::string& command, Json::Value& params
}
else
{
return (this->*(commandsA[i].dfpFunc))(params);
try {
return (this->*(commandsA[i].dfpFunc))(params);
}
catch (...)
{
return RPCError(rpcINTERNAL);
}
}
}