From 3b97064d40e93c26bdf895c52bedb2f58dda0406 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 4 Jan 2005 22:03:16 +0000 Subject: Added diagnostic error string for 'exceptions::connection_error' + fixed a bug in 'posixSocket::connect()' when specifying an IP address. --- src/exception.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/exception.cpp') diff --git a/src/exception.cpp b/src/exception.cpp index fcb53900..cbdc3f3d 100644 --- a/src/exception.cpp +++ b/src/exception.cpp @@ -303,8 +303,10 @@ const string messaging_exception::name() const { return "messaging_exception"; } // connection_error::~connection_error() throw() {} -connection_error::connection_error(const exception& other) - : messaging_exception("Connection error.", other) {} +connection_error::connection_error(const string& what, const exception& other) + : messaging_exception(what.empty() + ? "Connection error." + : "Connection error: '" + what + "'.", other) {} exception* connection_error::clone() const { return new connection_error(*this); } const string connection_error::name() const { return "connection_error"; } -- cgit v1.2.3