20#ifndef RIPPLE_PROTOCOL_ERRORCODES_H_INCLUDED 
   21#define RIPPLE_PROTOCOL_ERRORCODES_H_INCLUDED 
   23#include <xrpl/json/json_value.h> 
   24#include <xrpl/protocol/jss.h> 
  194        , 
message(
"An unknown error code.")
 
 
  202        char const* message_)
 
 
  210        char const* message_,
 
 
 
  231template <
class JsonValue>
 
  236    json[jss::error] = info.
token;
 
  237    json[jss::error_code] = info.
code;
 
  238    json[jss::error_message] = info.
message;
 
 
  241template <
class JsonValue>
 
  248template <
class JsonValue>
 
  253    json[jss::error] = info.
token;
 
  254    json[jss::error_code] = info.
code;
 
  255    json[jss::error_message] = message;
 
 
  279    return "Missing field '" + name + 
"'.";
 
 
  297    return "Invalid field '" + name + 
"', not object.";
 
 
  315    return "Invalid field '" + name + 
"'.";
 
 
  339    return "Invalid field '" + name + 
"', not " + type + 
".";
 
 
Lightweight wrapper to tag static string.
 
bool contains_error(Json::Value const &json)
Returns true if the json contains an rpc error specification.
 
Json::Value make_error(error_code_i code)
Returns a new json object that reflects the error code.
 
Json::Value invalid_field_error(std::string const &name)
 
void inject_error(error_code_i code, JsonValue &json)
Add or update the json update to reflect the error code.
 
Json::Value make_param_error(std::string const &message)
Returns a new json object that indicates invalid parameters.
 
std::string missing_field_message(std::string const &name)
 
Json::Value not_validator_error()
 
int error_code_http_status(error_code_i code)
Returns http status that corresponds to the error code.
 
std::string invalid_field_message(std::string const &name)
 
std::string expected_field_message(std::string const &name, std::string const &type)
 
Json::Value object_field_error(std::string const &name)
 
std::string object_field_message(std::string const &name)
 
ErrorInfo const & get_error_info(error_code_i code)
Returns an ErrorInfo that reflects the error code.
 
Json::Value expected_field_error(std::string const &name, std::string const &type)
 
Json::Value missing_field_error(std::string const &name)
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
std::string rpcErrorString(Json::Value const &jv)
Returns a single string with the contents of an RPC error.
 
@ rpcDELEGATE_ACT_NOT_FOUND
 
@ rpcCHANNEL_AMT_MALFORMED
 
@ rpcEXPIRED_VALIDATOR_LIST
 
@ rpcUNEXPECTED_LEDGER_TYPE
 
@ rpcREPORTING_UNSUPPORTED
 
warning_code_i
Codes returned in the warnings array of certain RPC commands.
 
@ warnRPC_EXPIRED_VALIDATOR_LIST
 
@ warnRPC_FIELDS_DEPRECATED
 
@ warnRPC_UNSUPPORTED_MAJORITY
 
@ warnRPC_AMENDMENT_BLOCKED
 
Maps an rpc error code to its token, default message, and HTTP status.
 
constexpr ErrorInfo(error_code_i code_, char const *token_, char const *message_)
 
Json::StaticString message
 
constexpr ErrorInfo(error_code_i code_, char const *token_, char const *message_, int http_status_)