From 738835d7b8ab80bd0812805f197471c54c72d7f9 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 4 Oct 2012 09:34:44 +0200 Subject: Document RPC error codes Replace all "magic values" in RPCError(...) by constants. --- src/rpcblockchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rpcblockchain.cpp') diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 5469dd2952..2dfdf58422 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -150,7 +150,7 @@ Value getblock(const Array& params, bool fHelp) uint256 hash(strHash); if (mapBlockIndex.count(hash) == 0) - throw JSONRPCError(-5, "Block not found"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found"); CBlock block; CBlockIndex* pblockindex = mapBlockIndex[hash]; -- cgit v1.2.3