mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 13:35:54 +00:00
Add isRpcError().
This commit is contained in:
@@ -88,4 +88,9 @@ Json::Value rpcError(int iError, Json::Value jvResult)
|
||||
return jvResult;
|
||||
}
|
||||
|
||||
bool isRpcError(Json::Value jvResult)
|
||||
{
|
||||
return jvResult.isObject() && jvResult.isMember("error");
|
||||
}
|
||||
|
||||
// vim:ts=4
|
||||
|
||||
@@ -77,6 +77,8 @@ enum {
|
||||
rpcNO_GEN_DECRPYT,
|
||||
};
|
||||
|
||||
bool isRpcError(Json::Value jvResult);
|
||||
Json::Value rpcError(int iError, Json::Value jvResult=Json::Value(Json::objectValue));
|
||||
|
||||
#endif
|
||||
// vim:ts=4
|
||||
|
||||
Reference in New Issue
Block a user