| 406 | } |
| 407 | |
| 408 | Object JSONRPCExecOne(const Value& req) { |
| 409 | Object rpc_result; |
| 410 | |
| 411 | JSONRequest jreq; |
| 412 | try { |
| 413 | jreq.parse(req); |
| 414 | |
| 415 | Value result = tableRPC.execute(jreq.strMethod, jreq.params); |
| 416 | rpc_result = JSONRPCReplyObj(result, Value::null, jreq.id); |
| 417 | } catch (Object& objError) { |
| 418 | rpc_result = JSONRPCReplyObj(Value::null, objError, jreq.id); |
| 419 | } catch (std::exception& e) { |
| 420 | rpc_result = JSONRPCReplyObj(Value::null, JSONRPCError(RPC_PARSE_ERROR, e.what()), jreq.id); |
| 421 | } |
| 422 | |
| 423 | return rpc_result; |
| 424 | } |
| 425 | |
| 426 | string JSONRPCExecBatch(const Array& vReq) { |
| 427 | Array ret; |
no test coverage detected