summaryrefslogtreecommitdiffstats
path: root/src/rpc-server
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-10-23 07:56:10 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-10-28 14:38:33 +0200
commit7f69fa8d0ef16124b266cd5a474942f432140d11 (patch)
treeb4a7e6312d97b1aec7069131a6b13ac325ca8389 /src/rpc-server
parent2dab6b6d09f9f1474d2ade6b465ebfa5ce3b3f5e (diff)
Add method name to "Method not registered" error
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'src/rpc-server')
-rw-r--r--src/rpc-server/trex_rpc_jsonrpc_v2_parser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc-server/trex_rpc_jsonrpc_v2_parser.cpp b/src/rpc-server/trex_rpc_jsonrpc_v2_parser.cpp
index 9d9de53a..4fa2447d 100644
--- a/src/rpc-server/trex_rpc_jsonrpc_v2_parser.cpp
+++ b/src/rpc-server/trex_rpc_jsonrpc_v2_parser.cpp
@@ -192,7 +192,9 @@ void TrexJsonRpcV2Parser::parse_single_request(Json::Value &request,
/* lookup the method in the DB */
TrexRpcCommand * rpc_cmd = TrexRpcCommandsTable::get_instance().lookup(method_name);
if (!rpc_cmd) {
- commands.push_back(new JsonRpcError(msg_id, JSONRPC_V2_ERR_METHOD_NOT_FOUND, "Method not registered"));
+ std::stringstream err;
+ err << "Method " << method_name << " not registered";
+ commands.push_back(new JsonRpcError(msg_id, JSONRPC_V2_ERR_METHOD_NOT_FOUND, err.str()));
return;
}