summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/slice/Ice/LocalException.ice7
-rw-r--r--cpp/src/Ice/Exception.cpp2
-rw-r--r--cpp/src/Ice/Network.cpp2
3 files changed, 10 insertions, 1 deletions
diff --git a/cpp/slice/Ice/LocalException.ice b/cpp/slice/Ice/LocalException.ice
index b6959aa7c5d..819a92ccead 100644
--- a/cpp/slice/Ice/LocalException.ice
+++ b/cpp/slice/Ice/LocalException.ice
@@ -366,6 +366,13 @@ local exception DNSException
*
**/
int error; // Don't use h_errno, as h_errno is usually a macro.
+
+ /**
+ *
+ * The host name which couldn't be resolved.
+ *
+ **/
+ string host;
};
/**
diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp
index d31c97e6718..d471a7b6b55 100644
--- a/cpp/src/Ice/Exception.cpp
+++ b/cpp/src/Ice/Exception.cpp
@@ -239,7 +239,7 @@ void
Ice::DNSException::ice_print(ostream& out) const
{
Exception::ice_print(out);
- out << ":\nDNS error: " << errorToStringDNS(error);
+ out << ":\nDNS error: " << errorToStringDNS(error) << "\nhost: " << host;
}
void
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index 3d9c77a3271..d2f35294cc7 100644
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -606,6 +606,7 @@ IceInternal::getAddress(const string& host, int port, struct sockaddr_in& addr)
{
DNSException ex(__FILE__, __LINE__);
ex.error = getDNSErrno();
+ ex.host = host;
throw ex;
}
@@ -644,6 +645,7 @@ IceInternal::getLocalHost(bool numeric)
{
DNSException ex(__FILE__, __LINE__);
ex.error = getDNSErrno();
+ ex.host = host;
throw ex;
}