ApiFunction::Ptr afunc = ApiFunction::GetByName(method);
if (!afunc)
- BOOST_THROW_EXCEPTION(std::invalid_argument("Function '" + method + "' does not exist."));
-
- resultMessage->Set("result", afunc->Invoke(origin, message->Get("params")));
+ Log(LogWarning, "JsonRpcConnection")
+ << "Call to non-existent function '" << method << "' from endpoint '" << m_Identity << "'.";
+ else
+ resultMessage->Set("result", afunc->Invoke(origin, message->Get("params")));
} catch (const std::exception& ex) {
/* TODO: Add a user readable error message for the remote caller */
String diagInfo = DiagnosticInformation(ex);