From 5a2ab964a4df59bdca6222e2d4cb5865fabbd629 Mon Sep 17 00:00:00 2001 From: Shane Kerr Date: Thu, 15 Mar 2018 13:08:07 -0400 Subject: [PATCH] Return name of RPC call if it failed (#42) * Provide indication of which RPC was tried if it fails --- src/bitcoinrpc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index aafca1bd..83ac5bb6 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1030,7 +1030,7 @@ json_spirit::Value CRPCTable::execute(const std::string &strMethod, const json_s // Find method const CRPCCommand *pcmd = tableRPC[strMethod]; if (!pcmd) - throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Method not found"); + throw JSONRPCError(RPC_METHOD_NOT_FOUND, string("Method '") + strMethod + string("' not found")); // Observe safe mode string strWarning = GetWarnings("rpc");