diff options
author | dexX7 <ugithub@bitwatch.co> | 2014-10-24 15:43:40 +0200 |
---|---|---|
committer | dexX7 <ugithub@bitwatch.co> | 2014-10-24 19:18:03 +0200 |
commit | 6261e6e6e0ae9860d322efe0f11d0960b300dad4 (patch) | |
tree | 228617a9943c18ae3e59b35cdd1fe377f3cfe480 | |
parent | 3552d4b859d56726cd25baa6f1e5988050bdad33 (diff) |
getblockhash: throw JSONRPCError (not runtime_error)
-rw-r--r-- | src/rpcblockchain.cpp | 2 |
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(); |