diff --git a/client/client.cpp b/client/client.cpp index 0bda2676..cc2243ed 100644 --- a/client/client.cpp +++ b/client/client.cpp @@ -406,9 +406,9 @@ parse(int argc, const char** argv) try { s_serverAddress = CNetworkAddress(argv[i], kDefaultPort); } - catch (XSocketAddress&) { - log((CLOG_PRINT "%s: invalid server address" BYE, - pname, pname)); + catch (XSocketAddress& e) { + log((CLOG_PRINT "%s: %s" BYE, + pname, e.what(), pname)); bye(kExitArgs); } } diff --git a/net/XSocket.cpp b/net/XSocket.cpp index f746abc5..63f9fc03 100644 --- a/net/XSocket.cpp +++ b/net/XSocket.cpp @@ -44,7 +44,7 @@ XSocketAddress::getWhat() const throw() "unknown error for: %{1}:%{2}", "address not found for: %{1}", "no address for: %{1}", - "invalid port: %{2}" + "invalid port" // m_port may not be set to the bad port }; return format(s_errorID[m_error], s_errorMsg[m_error], m_hostname.c_str(), diff --git a/server/server.cpp b/server/server.cpp index 86081fa5..c49d4a8e 100644 --- a/server/server.cpp +++ b/server/server.cpp @@ -337,8 +337,8 @@ parse(int argc, const char** argv) s_synergyAddress = CNetworkAddress(argv[i + 1], kDefaultPort); } catch (XSocketAddress& e) { - log((CLOG_PRINT "%s: invalid address for `%s'. %s." BYE, - pname, argv[i], e.what(), pname)); + log((CLOG_PRINT "%s: %s" BYE, + pname, e.what(), pname)); bye(kExitArgs); } ++i; @@ -350,8 +350,8 @@ parse(int argc, const char** argv) s_httpAddress = CNetworkAddress(argv[i + 1], kDefaultPort + 1); } catch (XSocketAddress& e) { - log((CLOG_PRINT "%s: invalid address for `%s'. %s." BYE, - pname, argv[i], e.what(), pname)); + log((CLOG_PRINT "%s: %s" BYE, + pname, e.what(), pname)); bye(kExitArgs); } ++i;