aboutsummaryrefslogtreecommitdiffstats
path: root/src/exception.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-08-24 20:47:13 +0000
committerVincent Richard <[email protected]>2005-08-24 20:47:13 +0000
commit658fcc26b54eabcdb4bd1dea57a8f7191cdffe2e (patch)
tree8d3856b9813f12025f8134a0568fe6b4d4aa8635 /src/exception.cpp
parentRenamed 'vmime::messaging' to 'vmime::net'. (diff)
downloadvmime-658fcc26b54eabcdb4bd1dea57a8f7191cdffe2e.tar.gz
vmime-658fcc26b54eabcdb4bd1dea57a8f7191cdffe2e.zip
Error handling in posixSocket::send().
Diffstat (limited to 'src/exception.cpp')
-rw-r--r--src/exception.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/exception.cpp b/src/exception.cpp
index 5090e4fe..a8479b82 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -329,12 +329,26 @@ const char* net_exception::name() const throw() { return "net_exception"; }
//
+// socket_exception
+//
+
+socket_exception::~socket_exception() throw() {}
+socket_exception::socket_exception(const string& what, const exception& other)
+ : net_exception(what.empty()
+ ? "Socket error."
+ : "Socket error: '" + what + "'.", other) {}
+
+exception* socket_exception::clone() const { return new socket_exception(*this); }
+const char* socket_exception::name() const throw() { return "socket_exception"; }
+
+
+//
// connection_error
//
connection_error::~connection_error() throw() {}
connection_error::connection_error(const string& what, const exception& other)
- : net_exception(what.empty()
+ : socket_exception(what.empty()
? "Connection error."
: "Connection error: '" + what + "'.", other) {}