Skip to content

Commit

Permalink
Return name of RPC call if it failed (#42)
Browse files Browse the repository at this point in the history
* Provide indication of which RPC was tried if it fails
  • Loading branch information
shane-kerr authored Mar 15, 2018
1 parent e992742 commit 5a2ab96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bitcoinrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 5a2ab96

Please sign in to comment.