---
title: llarp::rpc::rpc_error

---

# llarp::rpc::rpc_error





Inherits from std::runtime_error

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[rpc_error](Classes/structllarp_1_1rpc_1_1rpc__error.md#function-rpc-error)**(int16_t code, std::string message) |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| int16_t | **[code](Classes/structllarp_1_1rpc_1_1rpc__error.md#variable-code)**  |
| std::string | **[message](Classes/structllarp_1_1rpc_1_1rpc__error.md#variable-message)**  |

## Public Functions Documentation

### function rpc_error

```cpp
inline rpc_error(
    int16_t code,
    std::string message
)
```


**Parameters**: 

  * **code** - a signed, 16-bit numeric code. 0 must not be used (as it is used for a success code in OxenMQ), and values in the -32xxx range are reserved by JSON-RPC.
  * **message** - a message to send along with the error code (see general description above). 


## Public Attributes Documentation

### variable code

```cpp
int16_t code;
```


### variable message

```cpp
std::string message;
```


-------------------------------

Updated on 2023-01-18 at 23:51:38 +0000