diff options
author | Vincent Richard <[email protected]> | 2005-01-04 22:03:16 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2005-01-04 22:03:16 +0000 |
commit | 3b97064d40e93c26bdf895c52bedb2f58dda0406 (patch) | |
tree | 517bd37ecea5c668620db1696f60ad2c45d95b10 /src/exception.cpp | |
parent | Fixed a linking error with g++ <= 3.2. (diff) | |
download | vmime-3b97064d40e93c26bdf895c52bedb2f58dda0406.tar.gz vmime-3b97064d40e93c26bdf895c52bedb2f58dda0406.zip |
Added diagnostic error string for 'exceptions::connection_error' + fixed a bug in 'posixSocket::connect()' when specifying an IP address.
Diffstat (limited to 'src/exception.cpp')
-rw-r--r-- | src/exception.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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"; } |