aboutsummaryrefslogtreecommitdiffstats
path: root/src/exception.cpp
diff options
context:
space:
mode:
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) {}