3#include <xrpl/beast/utility/instrumentation.h>
4#include <xrpl/protocol/ErrorCodes.h>
5#include <xrpl/protocol/TER.h>
30 template <
typename T,
typename = std::enable_if_t<std::is_
integral_v<T>>>
73 XRPL_ASSERT(
type_ ==
Type::TER,
"xrpl::RPC::Status::toTER : type is TER");
static constexpr TERSubset fromInt(int from)
API version numbers used in later API versions.
void injectError(ErrorCodeI code, json::Value &json)
Add or update the json update to reflect the error code.
constexpr TERUnderlyingType TERtoInt(TELcodes v)
TERSubset< CanCvtToTER > TER
Strings const & messages() const
Status(TER ter, Strings d={})
std::string message() const
Return the first message, if any.
std::string codeString() const
std::vector< std::string > Strings
Status(T code, Strings d={})
Status(ErrorCodeI e, Strings d={})
TER toTER() const
Returns the Status as a TER.
bool operator!() const
Returns true if the Status is OK.
static constexpr Code kOK
void fillJson(json::Value &)
Fill a json::Value with an RPC 2.0 response.
Status(ErrorCodeI e, std::string const &s)
void inject(json::Value &object) const
Apply the Status to a JsonObject.
ErrorCodeI toErrorCode() const
Returns the Status as an error_code_i.
std::string toString() const