rippled
Loading...
Searching...
No Matches
RPCErr.cpp
1#include <xrpl/json/json_value.h>
2#include <xrpl/protocol/ErrorCodes.h>
3#include <xrpl/protocol/RPCErr.h>
4#include <xrpl/protocol/jss.h>
5
6namespace ripple {
7
8struct RPCErr;
9
10// VFALCO NOTE Deprecated function
12rpcError(int iError)
13{
15 RPC::inject_error(iError, jvResult);
16 return jvResult;
17}
18
19// VFALCO NOTE Deprecated function
20bool
22{
23 return jvResult.isObject() && jvResult.isMember(jss::error);
24}
25
26} // namespace ripple
Represents a JSON value.
Definition json_value.h:131
bool isObject() const
bool isMember(char const *key) const
Return true if the object has a member named key.
@ objectValue
object value (collection of name/value pairs).
Definition json_value.h:27
void inject_error(error_code_i code, JsonValue &json)
Add or update the json update to reflect the error code.
Definition ErrorCodes.h:214
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
Json::Value rpcError(int iError)
Definition RPCErr.cpp:12
bool isRpcError(Json::Value jvResult)
Definition RPCErr.cpp:21