Utils: Implement more flexible SystemException
[senf.git] / Socket / Protocols / INet / UDPSocketHandle.cc
index 35caf99..3d7f3d2 100644 (file)
@@ -46,7 +46,7 @@ prefix_ void senf::UDPv4SocketProtocol::init_client()
 {
     int sock = ::socket(PF_INET,SOCK_DGRAM,0);
     if (sock < 0)
-        throw SystemException(errno);
+        throwErrno();
     body().fd(sock);
 }
 
@@ -72,7 +72,7 @@ prefix_ void senf::UDPv6SocketProtocol::init_client()
 {
     int sock = ::socket(PF_INET6,SOCK_DGRAM,0);
     if (sock < 0)
-        throw SystemException(errno);
+        throwErrno();
     body().fd(sock);
 }