xrpld
Loading...
Searching...
No Matches
RPCErr.cpp
1#include <xrpl/protocol/RPCErr.h>
2
3#include <xrpl/json/json_value.h>
4#include <xrpl/protocol/ErrorCodes.h>
5#include <xrpl/protocol/jss.h>
6
7namespace xrpl {
8
9struct RPCErr;
10
11// VFALCO NOTE Deprecated function
12json::Value
14{
16 RPC::injectError(iError, jvResult);
17 return jvResult;
18}
19
20// VFALCO NOTE Deprecated function
21bool
23{
24 return jvResult.isObject() && jvResult.isMember(jss::error);
25}
26
27} // namespace xrpl
Represents a JSON value.
Definition json_value.h:130
bool isObject() const
bool isMember(char const *key) const
Return true if the object has a member named key.
@ Object
object value (collection of name/value pairs).
Definition json_value.h:26
void injectError(ErrorCodeI code, json::Value &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.
Definition algorithm.h:5
ErrorCodeI
Definition ErrorCodes.h:22
json::Value rpcError(ErrorCodeI iError)
Definition RPCErr.cpp:13
bool isRpcError(json::Value jvResult)
Definition RPCErr.cpp:22