pgator

JSON-RPC 2.0 Protocol

This module contain JSON-RPC 2.0 errors

See Also
http://www.jsonrpc.org/specification
License
Subject to the terms of the MIT license, as written in the included LICENSE file.
Authors
Zaramzan

enum  RPC_ERROR_CODE: int;

Contains JSON-RPC 2.0 error codes

Authors
Zaramzan

string  RPC_VERSION;

Supported JSON-RPC protocol version


struct  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();

Authors
Zaramzan

class  RpcException: object.Exception;

Super class for all JSON-RPC exceptions