Boost C++ Libraries

PrevUpHomeNext

Type error

boost::taar::mcp::error — Error codes of the MCP layer.

Synopsis

// In header: <boost/taar/mcp/error.hpp>


enum error { success = 0, resource_not_found = -32002, 
             request_cancelled = -32800, client_error = 1, 
             unknown_session = 2 };

Description

A boost::taar::failure carries these in the error_category category. Where MCP assigns a JSON-RPC wire code the enumerator's value is that code (resource_not_found is -32002, request_cancelled is -32800), so code.value() is what goes on the wire. The others describe failures of server-to-client requests and have no wire code of their own.

success
No error.
resource_not_found
No resource matches the requested URI.
request_cancelled
The request was cancelled.
client_error
The client answered a server-to-client request with a JSON-RPC error; the failure's data is {"code": n, "data": ...}.
unknown_session
No MCP session has the given id.

PrevUpHomeNext