JSONRPCError

Build a JSON-RPC error object.

Synopsis

Declared in <rpc/request.h>

UniValue
JSONRPCError(
    int code,
    std::string const& message);

Return Value

A JSON object representing the error.

Parameters

NameDescription
codeThe numeric error code.
messageThe human-readable error message.