summaryrefslogtreecommitdiff
path: root/lib/Socket.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Socket.cc')
-rw-r--r--lib/Socket.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Socket.cc b/lib/Socket.cc
index de6f42e..f3f4c0f 100644
--- a/lib/Socket.cc
+++ b/lib/Socket.cc
@@ -133,13 +133,13 @@ bool Socket::Listen(void) {
return listening;
}
-Socket Socket::Accept(void) {
+Socket Socket::Accept(void) throw (GeneralException) {
struct sockaddr inaddr;
socklen_t inlen = sizeof(inaddr);
int h;
if ((h = accept(GetHandle(), &inaddr, &inlen)) < 0) {
- return Socket();
+ throw GeneralException("Failed accepting.");
} else {
return Socket(h);
}