Merge branch 'master' of github.com:jedmccaleb/NewCoin

This commit is contained in:
jed
2012-06-11 14:01:37 -07:00

View File

@@ -89,15 +89,13 @@ Json::Value RPCServer::RPCError(int iError)
Json::Value jsonResult = Json::Value(Json::objectValue);
jsonResult["error"] = iError;
if (i >= 0) {
jsonResult["error"] = i >= 0 ? errorInfoA[i].pToken : boost::lexical_cast<std::string>(iError);
jsonResult["error_message"] = i >= 0 ? errorInfoA[i].pMessage : boost::lexical_cast<std::string>(iError);
jsonResult["error_code"] = iError;
if (i >= 0)
std::cerr << "RPCError: "
<< errorInfoA[i].pToken << ": " << errorInfoA[i].pMessage << std::endl;
jsonResult["error_token"] = errorInfoA[i].pToken;
jsonResult["error_message"] = errorInfoA[i].pMessage;
}
return jsonResult;
}