Utils: Implement more flexible SystemException
[senf.git] / Socket / SocketProtocol.cc
index e341447..13ee94e 100644 (file)
@@ -37,9 +37,9 @@ prefix_ void senf::SocketProtocol::close()
     const
 {
     if (::shutdown(body().fd(),SHUT_RDWR) < 0)
-        throw SystemException(errno);
+        throwErrno();
     if (::close(body().fd()) < 0)
-        throw SystemException(errno);
+        throwErrno();
 }
 
 prefix_ void senf::SocketProtocol::terminate()