Utils: Implement helper macros to add file/line information to SystemException's
[senf.git] / Socket / Protocols / UN / ConnectedUNDatagramSocketHandle.cc
index efe1d7f..af7fd44 100644 (file)
 
 prefix_ void senf::ConnectedUNDatagramSocketProtocol::init_client() const
 {
-    int sock = ::socket(PF_UNIX,SOCK_DGRAM,0);
+    int sock = ::socket(PF_UNIX, SOCK_DGRAM, 0);
     if (sock < 0)
-        throw SystemException();
-   fd(sock);
+        SENF_THROW_SYSTEM_EXCEPTION("Could not create socket(PF_UNIX,SOCK_DGRAM,0).");
+    fd(sock);
 }
 
 prefix_ void senf::ConnectedUNDatagramSocketProtocol::init_client(UNSocketAddress const & address) const