| 390 | } |
| 391 | |
| 392 | static UniValue JSONRPCExecOne(JSONRPCRequest jreq, const UniValue& req) |
| 393 | { |
| 394 | UniValue rpc_result(UniValue::VOBJ); |
| 395 | |
| 396 | try { |
| 397 | jreq.parse(req); |
| 398 | |
| 399 | UniValue result = tableRPC.execute(jreq); |
| 400 | rpc_result = JSONRPCReplyObj(result, NullUniValue, jreq.id); |
| 401 | } |
| 402 | catch (const UniValue& objError) |
| 403 | { |
| 404 | rpc_result = JSONRPCReplyObj(NullUniValue, objError, jreq.id); |
| 405 | } |
| 406 | catch (const std::exception& e) |
| 407 | { |
| 408 | rpc_result = JSONRPCReplyObj(NullUniValue, |
| 409 | JSONRPCError(RPC_PARSE_ERROR, e.what()), jreq.id); |
| 410 | } |
| 411 | |
| 412 | return rpc_result; |
| 413 | } |
| 414 | |
| 415 | std::string JSONRPCExecBatch(const JSONRPCRequest& jreq, const UniValue& vReq) |
| 416 | { |
no test coverage detected