aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-10-27 09:51:57 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-10-27 10:18:26 +0100
commit2ffdf21ce39fc3133fc028fb51d49cd7479eaa43 (patch)
tree825cc07dac3812387ef17b45a80a70a065c69eb9 /src
parent65e4e8427d900b27f579dc12af6c74b3ec628286 (diff)
parent6261e6e6e0ae9860d322efe0f11d0960b300dad4 (diff)
Merge pull request #5134
6261e6e getblockhash: throw JSONRPCError (not runtime_error) (dexX7)
Diffstat (limited to 'src')
-rw-r--r--src/rpcblockchain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 5beac0512a..02b510aa41 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -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();