Have RPCServer report messages from throws.

This commit is contained in:
Arthur Britto
2012-10-10 12:44:00 -07:00
parent 9d10cb419a
commit ab6dfadc5f

View File

@@ -2738,8 +2738,10 @@ Json::Value RPCServer::doCommand(const std::string& command, Json::Value& params
try {
return (this->*(commandsA[i].dfpFunc))(params);
}
catch (...)
catch (std::exception& e)
{
cLog(lsINFO) << "Caught throw: " << e.what();
return RPCError(rpcINTERNAL);
}
}