Skip to content

Commit

Permalink
Merge pull request bitcoin#5134
Browse files Browse the repository at this point in the history
6261e6e getblockhash: throw JSONRPCError (not runtime_error) (dexX7)
  • Loading branch information
laanwj committed Oct 27, 2014
2 parents 65e4e84 + 6261e6e commit 2ffdf21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpcblockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Value getblockhash(const Array& params, bool fHelp)

int nHeight = params[0].get_int();
if (nHeight < 0 || nHeight > chainActive.Height())
throw runtime_error("Block number out of range.");
throw JSONRPCError(RPC_INVALID_PARAMETER, "Block height out of range");

CBlockIndex* pblockindex = chainActive[nHeight];
return pblockindex->GetBlockHash().GetHex();
Expand Down

0 comments on commit 2ffdf21

Please sign in to comment.