diff options
| author | instagibbs <[email protected]> | 2016-11-03 09:56:26 -0400 |
|---|---|---|
| committer | instagibbs <[email protected]> | 2016-11-03 12:09:38 -0400 |
| commit | 8f329f991bc81ddcfb4f51574e2003edde14e996 (patch) | |
| tree | a07a1be2baf1999a0114e0368be195c9efe15bf6 /src/bitcoin-cli.cpp | |
| parent | Merge #9050: net: make a few values immutable, and use deterministic randomne... (diff) | |
| download | discoin-8f329f991bc81ddcfb4f51574e2003edde14e996.tar.xz discoin-8f329f991bc81ddcfb4f51574e2003edde14e996.zip | |
Add common failure cases for rpc server connection failure
Diffstat (limited to 'src/bitcoin-cli.cpp')
| -rw-r--r-- | src/bitcoin-cli.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 2d66448d8..8a2f380e6 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -240,7 +240,7 @@ UniValue CallRPC(const string& strMethod, const UniValue& params) event_base_free(base); if (response.status == 0) - throw CConnectionFailed(strprintf("couldn't connect to server (%d %s)", response.error, http_errorstring(response.error))); + throw CConnectionFailed(strprintf("couldn't connect to server\n(make sure server is running and you are connecting to the correct RPC port: %d %s)", response.error, http_errorstring(response.error))); else if (response.status == HTTP_UNAUTHORIZED) throw runtime_error("incorrect rpcuser or rpcpassword (authorization failed)"); else if (response.status >= 400 && response.status != HTTP_BAD_REQUEST && response.status != HTTP_NOT_FOUND && response.status != HTTP_INTERNAL_SERVER_ERROR) |