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

Method setWhatMessage

src/jsonrpccpp/common/exception.cpp:43–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41const char *JsonRpcException::what() const throw() { return this->whatString.c_str(); }
42
43void JsonRpcException::setWhatMessage() {
44 if (this->code != 0) {
45 std::stringstream ss;
46 ss << "Exception " << this->code << " : " << this->message;
47 if (data != Json::nullValue)
48 ss << ", data: " << data.toStyledString();
49 this->whatString = ss.str();
50 } else {
51 this->whatString = this->message;
52 }
53}

Callers 1

JsonRpcExceptionMethod · 0.95

Calls 1

strMethod · 0.80

Tested by

no test coverage detected