dispatch.c: changed api_set_error_call

This commit is contained in:
micha 2018-07-15 12:12:03 +02:00
parent ed02278e42
commit 099718ae6d

View File

@ -40,10 +40,8 @@ MsgpackRpcRequestHandler msgpack_rpc_get_handler_for(const char *name,
map_get(String, MsgpackRpcRequestHandler)(methods, m); map_get(String, MsgpackRpcRequestHandler)(methods, m);
if (!rv.fn) { if (!rv.fn) {
String method_name = m.size > 0 ?
m : cstr_as_string("<empty>");
api_set_error(error, kErrorTypeException, "Invalid method: %s", api_set_error(error, kErrorTypeException, "Invalid method: %s",
method_name); m.size > 0 ? m.data : "<empty>");
} }
return rv; return rv;
} }