20#ifndef RIPPLE_RPC_STATUS_H_INCLUDED
21#define RIPPLE_RPC_STATUS_H_INCLUDED
23#include <xrpl/beast/utility/instrumentation.h>
24#include <xrpl/protocol/ErrorCodes.h>
25#include <xrpl/protocol/TER.h>
110 "ripple::RPC::Status::toTER : type is error code");
116 template <
class Object>
static constexpr TERSubset fromInt(int from)
void inject_error(error_code_i code, JsonValue &json)
Add or update the json update to reflect the error code.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
constexpr TERUnderlyingType TERtoInt(TELcodes v)
Status represents the results of an operation that might fail.
Strings const & messages() const
error_code_i toErrorCode() const
Returns the Status as an error_code_i.
Status(error_code_i e, std::string const &s)
std::vector< std::string > Strings
Status(TER ter, Strings d={})
Status(error_code_i e, Strings d={})
std::string toString() const
void inject(Object &object) const
Apply the Status to a JsonObject.
std::string message() const
Return the first message, if any.
Status(T code, Strings d={})
bool operator!() const
Returns true if the Status is OK.
TER toTER() const
Returns the Status as a TER.
std::string codeString() const
void fillJson(Json::Value &)
Fill a Json::Value with an RPC 2.0 response.