aboutsummaryrefslogtreecommitdiff
path: root/src/rpcblockchain.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2014-10-27 09:51:57 +0100
committerWladimir J. van der Laan <[email protected]>2014-10-27 10:18:26 +0100
commit2ffdf21ce39fc3133fc028fb51d49cd7479eaa43 (patch)
tree825cc07dac3812387ef17b45a80a70a065c69eb9 /src/rpcblockchain.cpp
parentMerge pull request #5093 (diff)
parentgetblockhash: throw JSONRPCError (not runtime_error) (diff)
downloaddiscoin-2ffdf21ce39fc3133fc028fb51d49cd7479eaa43.tar.xz
discoin-2ffdf21ce39fc3133fc028fb51d49cd7479eaa43.zip
Merge pull request #5134
6261e6e getblockhash: throw JSONRPCError (not runtime_error) (dexX7)
Diffstat (limited to 'src/rpcblockchain.cpp')
-rw-r--r--src/rpcblockchain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 5beac0512..02b510aa4 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();