JSON RPC
JSON-RPC 2.0 library for C++
wwa::json_rpc::method_not_found_exception Class Reference

Exception thrown when the method is not found. More...

#include <exception.h>

+ Inheritance diagram for wwa::json_rpc::method_not_found_exception:
+ Collaboration diagram for wwa::json_rpc::method_not_found_exception:

Public Member Functions

 method_not_found_exception ()
 
 method_not_found_exception (const method_not_found_exception &)=default
 
 method_not_found_exception (method_not_found_exception &&)=default
 
 ~method_not_found_exception () override
 Default destructor.
 
method_not_found_exceptionoperator= (const method_not_found_exception &)=default
 
method_not_found_exceptionoperator= (method_not_found_exception &&)=default
 
- Public Member Functions inherited from wwa::json_rpc::exception
 exception (const exception &)=default
 Default copy constructor.
 
 exception (exception &&)=default
 Default move constructor.
 
 exception (int code, std::string_view message)
 Construct a new exception object.
 
template<typename T>
 exception (int code, std::string_view message, const T &data)
 Construct a new exception object with additional data.
 
 ~exception () override
 Default destructor.
 
int code () const noexcept
 Returns the error code.
 
const nlohmann::json & data () const noexcept
 Returns custom data associated with the error.
 
const std::string & message () const noexcept
 Returns the error message.
 
exceptionoperator= (const exception &rhs)=default
 Default copy assignment operator.
 
exceptionoperator= (exception &&rhs)=default
 Default move assignment operator.
 
nlohmann::json to_json () const
 Returns the error message as an Error Object.
 
const char * what () const noexcept override
 Returns the error message.
 

Additional Inherited Members

- Static Public Attributes inherited from wwa::json_rpc::exception
static constexpr int INTERNAL_ERROR = -32603
 Internal JSON-RPC error.
 
static constexpr int INVALID_PARAMS = -32602
 Invalid method parameter(s).
 
static constexpr int INVALID_REQUEST = -32600
 The JSON sent is not a valid Request object.
 
static constexpr int METHOD_NOT_FOUND = -32601
 The method does not exist or is not available.
 
static constexpr int PARSE_ERROR = -32700
 Invalid JSON was received by the server.
 

Detailed Description

Exception thrown when the method is not found.

Definition at line 238 of file exception.h.

Constructor & Destructor Documentation

◆ method_not_found_exception() [1/3]

wwa::json_rpc::method_not_found_exception::method_not_found_exception ( )
inline

Definition at line 240 of file exception.h.

exception(int code, std::string_view message, const T &data)
Construct a new exception object with additional data.
Definition exception.h:134
static constexpr int METHOD_NOT_FOUND
The method does not exist or is not available.
Definition exception.h:110
static constexpr std::string_view err_method_not_found
Error message for when the method is not found.
Definition exception.h:50

◆ method_not_found_exception() [2/3]

wwa::json_rpc::method_not_found_exception::method_not_found_exception ( const method_not_found_exception & )
default

◆ method_not_found_exception() [3/3]

wwa::json_rpc::method_not_found_exception::method_not_found_exception ( method_not_found_exception && )
default

◆ ~method_not_found_exception()

wwa::json_rpc::method_not_found_exception::~method_not_found_exception ( )
overridedefault

Default destructor.

Member Function Documentation

◆ operator=() [1/2]

method_not_found_exception & wwa::json_rpc::method_not_found_exception::operator= ( const method_not_found_exception & )
default

◆ operator=() [2/2]

method_not_found_exception & wwa::json_rpc::method_not_found_exception::operator= ( method_not_found_exception && )
default

The documentation for this class was generated from the following files: