Document RPC error codes

Replace all "magic values" in RPCError(...) by constants.
This commit is contained in:
Wladimir J. van der Laan
2012-10-04 09:34:44 +02:00
parent 0547b02af7
commit 738835d7b8
7 changed files with 133 additions and 97 deletions

View File

@@ -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];