![]() |
error_mapper — Signature of the hook that maps a failed method call to a JSON-RPC error.
// In header: <boost/taar/jsonrpc/endpoint.hpp> typedef std::function< error_info(taar::failure const &)> error_mapper;
The endpoint wraps whatever a method callable throws with boost::taar::failure::from_exception once and hands the failure to the mapper. A user's own exception is kept in the failure and can be recognised with boost::taar::failure::as.