diff options
| author | dexX7 <[email protected]> | 2014-10-24 15:43:40 +0200 |
|---|---|---|
| committer | dexX7 <[email protected]> | 2014-10-24 19:18:03 +0200 |
| commit | 6261e6e6e0ae9860d322efe0f11d0960b300dad4 (patch) | |
| tree | 228617a9943c18ae3e59b35cdd1fe377f3cfe480 /src/rpcblockchain.cpp | |
| parent | Merge pull request #5128 (diff) | |
| download | discoin-6261e6e6e0ae9860d322efe0f11d0960b300dad4.tar.xz discoin-6261e6e6e0ae9860d322efe0f11d0960b300dad4.zip | |
getblockhash: throw JSONRPCError (not runtime_error)
Diffstat (limited to 'src/rpcblockchain.cpp')
| -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 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(); |