Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

Commit

Permalink
change exception code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gogs committed May 27, 2016
1 parent 9728ade commit add9efa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions router.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ class router : boost::noncopyable
auto it = map_invokers_.find(func_name);
if (it == map_invokers_.end())
{
result = get_json(result_code::EXCEPTION, "unknown function: " + func_name);
result = get_json(result_code::ARGUMENT_EXCEPTION, "unknown function: " + func_name);
callback_to_server_(func_name, result.c_str(), conn, true);
return;
}

if (it->second.param_size() != parser.param_size()) //参数个数不匹配
{
result = get_json(result_code::EXCEPTION, std::string("parameter number is not match"));
result = get_json(result_code::ARGUMENT_EXCEPTION, std::string("parameter number is not match"));
callback_to_server_(func_name, result.c_str(), conn, true);
break;
}
Expand Down

0 comments on commit add9efa

Please sign in to comment.