JSON-RPC 2.0
JSON-RPC 2.0 Modern C++ Library
|
#include <error.hpp>
Public Member Functions | |
RpcError (RpcErrorCode code, std::string message) | |
auto | to_json () const -> nlohmann::json |
auto | Code () const -> RpcErrorCode |
auto | Message () const -> std::string |
auto | operator== (const RpcError &other) const -> bool |
auto | operator!= (const RpcError &other) const -> bool |
Static Public Member Functions | |
static auto | FromCode (RpcErrorCode code, std::string message="") -> RpcError |
static auto | UnexpectedFromCode (RpcErrorCode code, std::string message="") -> std::unexpected< RpcError > |
|
inline |
|
inlinenodiscard |
Definition at line 77 of file error.hpp.
Referenced by jsonrpc::endpoint::Response::CreateError(), operator==(), and to_json().
|
inlinestatic |
Definition at line 93 of file error.hpp.
References jsonrpc::error::detail::DefaultMessageFor().
Referenced by jsonrpc::endpoint::Response::CreateError(), and UnexpectedFromCode().
|
inlinenodiscard |
Definition at line 81 of file error.hpp.
Referenced by jsonrpc::endpoint::Response::CreateError(), operator==(), and to_json().
|
inline |
|
inline |
|
inlinenodiscard |
|
inlinestatic |
Definition at line 101 of file error.hpp.
References FromCode().
Referenced by jsonrpc::transport::PipeTransport::BindAndListen(), jsonrpc::transport::PipeTransport::Connect(), jsonrpc::endpoint::Request::FromJson(), jsonrpc::transport::FramedPipeTransport::ReceiveMessage(), jsonrpc::transport::PipeTransport::ReceiveMessage(), jsonrpc::transport::SocketTransport::ReceiveMessage(), jsonrpc::transport::PipeTransport::RemoveExistingSocketFile(), jsonrpc::transport::PipeTransport::SendMessage(), jsonrpc::transport::SocketTransport::SendMessage(), jsonrpc::endpoint::RpcEndpoint::SendMethodCall(), jsonrpc::endpoint::RpcEndpoint::SendMethodCall(), jsonrpc::endpoint::RpcEndpoint::SendNotification(), jsonrpc::endpoint::RpcEndpoint::SendNotification(), jsonrpc::endpoint::RpcEndpoint::Start(), jsonrpc::transport::PipeTransport::Start(), and jsonrpc::transport::SocketTransport::Start().