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