aboutsummaryrefslogtreecommitdiff
path: root/src/rpcblockchain.cpp
diff options
context:
space:
mode:
authordexX7 <ugithub@bitwatch.co>2014-10-24 15:43:40 +0200
committerdexX7 <ugithub@bitwatch.co>2014-10-24 19:18:03 +0200
commit6261e6e6e0ae9860d322efe0f11d0960b300dad4 (patch)
tree228617a9943c18ae3e59b35cdd1fe377f3cfe480 /src/rpcblockchain.cpp
parent3552d4b859d56726cd25baa6f1e5988050bdad33 (diff)
downloadbitcoin-6261e6e6e0ae9860d322efe0f11d0960b300dad4.tar.xz
getblockhash: throw JSONRPCError (not runtime_error)
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 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();