diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-10-27 09:51:57 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-10-27 10:18:26 +0100 |
| commit | 2ffdf21ce39fc3133fc028fb51d49cd7479eaa43 (patch) | |
| tree | 825cc07dac3812387ef17b45a80a70a065c69eb9 /src/rpcblockchain.cpp | |
| parent | Merge pull request #5093 (diff) | |
| parent | getblockhash: throw JSONRPCError (not runtime_error) (diff) | |
| download | discoin-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.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(); |