MCPcopy Create free account
hub / github.com/cinemast/libjson-rpc-cpp / HandleResponse

Method HandleResponse

src/jsonrpccpp/client/rpcprotocolclient.cpp:37–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void RpcProtocolClient::HandleResponse(const std::string &response, Json::Value &result) {
38 Json::Value value;
39
40 try {
41 if (std::istringstream(response) >> value) {
42 this->HandleResponse(value, result);
43 } else {
44 throw JsonRpcException(Errors::ERROR_RPC_JSON_PARSE_ERROR, " " + response);
45 }
46 } catch (Json::Exception &e) {
47 throw JsonRpcException(Errors::ERROR_RPC_JSON_PARSE_ERROR, " " + response);
48 }
49}
50
51Json::Value RpcProtocolClient::HandleResponse(const Json::Value &value, Json::Value &result) {
52 if (this->ValidateResponse(value)) {

Callers 2

CallMethodMethod · 0.80
CallProceduresMethod · 0.80

Calls 4

ValidateResponseMethod · 0.95
HasErrorMethod · 0.95
throwErrorExceptionMethod · 0.95
JsonRpcExceptionClass · 0.50

Tested by

no test coverage detected