RpcError

Struct describes JSON-RPC 2.0 error object which used in RpcRequest

Example

auto err1 = RpcError(bson);
auto err2 = RpcError(RPC_ERROR_CODE.INVALID_PARAMS, "Invalid params");
auto err3 = RpcError(RPC_ERROR_CODE.INVALID_PARAMS, "mycustommessage");
auto err4 = RpcError(RPC_ERROR_CODE.INVALID_PARAMS, "Invalid params", erroData); 
auto err5 = RpcError(new RpcInvalidParams());

//toJson
err2.toJson();

Constructors

this
this(Bson bson)
Undocumented in source.
this
this(RPC_ERROR_CODE code, string message)
Undocumented in source.
this
this(RPC_ERROR_CODE code, string message, Json errorData)
Undocumented in source.
this
this(RpcException ex)
Undocumented in source.

Members

Functions

toJson
Json toJson()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

code
int code;
Undocumented in source.
data
Json data;
Undocumented in source.
message
string message;
Undocumented in source.

Meta

Authors

Zaramzan <shamyan.roman@gmail.com>