Utils: Removed ErrnoException and implemented generic Exception base-class
[senf.git] / Socket / Protocols / INet / TCPProtocol.cc
index 340e76b..6cfe2b6 100644 (file)
@@ -45,7 +45,7 @@ prefix_ bool senf::TCPProtocol::nodelay()
     int value;
     socklen_t len (sizeof(value));
     if (::getsockopt(fd(),SOL_TCP,TCP_NODELAY,&value,&len) < 0)
-        throwErrno();
+        throw SystemException();
     return value;
 }
 
@@ -54,7 +54,7 @@ prefix_ void senf::TCPProtocol::nodelay(bool value)
 {
     int ivalue (value);
     if (::setsockopt(fd(),SOL_TCP,TCP_NODELAY,&ivalue,sizeof(ivalue)) < 0)
-        throwErrno();
+        throw SystemException();
 }
 
 prefix_ unsigned senf::TCPProtocol::siocinq()
@@ -62,7 +62,7 @@ prefix_ unsigned senf::TCPProtocol::siocinq()
 {
     int n;
     if (::ioctl(fd(),SIOCINQ,&n) < 0)
-        throwErrno();
+        throw SystemException();
     return n;
 }
 
@@ -71,7 +71,7 @@ prefix_ unsigned senf::TCPProtocol::siocoutq()
 {
     int n;
     if (::ioctl(fd(),SIOCOUTQ,&n) < 0)
-        throwErrno();
+        throw SystemException();
     return n;
 }