aboutsummaryrefslogtreecommitdiffstats
path: root/src/exception.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-01-04 22:03:16 +0000
committerVincent Richard <[email protected]>2005-01-04 22:03:16 +0000
commit3b97064d40e93c26bdf895c52bedb2f58dda0406 (patch)
tree517bd37ecea5c668620db1696f60ad2c45d95b10 /src/exception.cpp
parentFixed a linking error with g++ <= 3.2. (diff)
downloadvmime-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.cpp6
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"; }