MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / JSONRPCExec

Function JSONRPCExec

src/rpc/server.cpp:346–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346UniValue JSONRPCExec(const JSONRPCRequest& jreq, bool catch_errors)
347{
348 UniValue result;
349 if (catch_errors) {
350 try {
351 result = tableRPC.execute(jreq);
352 } catch (UniValue& e) {
353 return JSONRPCReplyObj(NullUniValue, std::move(e), jreq.id, jreq.m_json_version);
354 } catch (const std::exception& e) {
355 return JSONRPCReplyObj(NullUniValue, JSONRPCError(RPC_MISC_ERROR, e.what()), jreq.id, jreq.m_json_version);
356 }
357 } else {
358 result = tableRPC.execute(jreq);
359 }
360
361 return JSONRPCReplyObj(std::move(result), NullUniValue, jreq.id, jreq.m_json_version);
362}
363
364/**
365 * Process named arguments into a vector of positional arguments, based on the

Callers 1

ExecuteHTTPRPCFunction · 0.85

Calls 4

JSONRPCReplyObjFunction · 0.85
JSONRPCErrorFunction · 0.85
executeMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected