aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2016-12-02 15:54:53 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-12-02 15:55:23 +0100
commit31bcc667863f368157efa1143a78623a5db8f0d1 (patch)
tree604b80f9507866f60a576a7a14362df42f8aeb6e
parent3fbf07926240256d20ca33fa6b049713d4881992 (diff)
parentfe37fbe606f099e81c693fae248c23c8f8fd5735 (diff)
Merge #9265: bitcoin-cli: Make error message less confusing
fe37fbe bitcoin-cli: Make error message less confusing (Wladimir J. van der Laan)
-rw-r--r--src/bitcoin-cli.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index b272640819..596cc8eada 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -247,7 +247,7 @@ UniValue CallRPC(const std::string& strMethod, const UniValue& params)
event_base_free(base);
if (response.status == 0)
- 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)));
+ throw CConnectionFailed(strprintf("couldn't connect to server: %s (code %d)\n(make sure server is running and you are connecting to the correct RPC port)", http_errorstring(response.error), response.error));
else if (response.status == HTTP_UNAUTHORIZED)
throw std::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)