Utils: Removed ErrnoException and implemented generic Exception base-class
[senf.git] / Socket / Protocols / INet / INetProtocol.cc
index e23230f..bf32dea 100644 (file)
@@ -1,8 +1,8 @@
 // $Id$
 //
 // Copyright (C) 2006
-// Fraunhofer Institute for Open Communication Systems (FOKUS) 
-// Competence Center NETwork research (NET), St. Augustin, GERMANY 
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
 //     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
@@ -43,7 +43,7 @@ prefix_ void senf::INetProtocol::bindInterface(std::string const & iface)
     const
 {
     if (::setsockopt(fd(), SOL_SOCKET, SO_BINDTODEVICE, iface.c_str(), iface.size()) < 0)
-        throwErrno("::setsockopt(SO_BINDTODEVICE)");
+        throw SystemException("::setsockopt(SO_BINDTODEVICE)");
 }
 
 prefix_ std::string senf::INetProtocol::bindInterface()
@@ -52,7 +52,7 @@ prefix_ std::string senf::INetProtocol::bindInterface()
     socklen_t size (sizeof(iface));
     ::memset(iface, 0, sizeof(iface));
     if (::getsockopt(fd(), SOL_SOCKET, SO_BINDTODEVICE, iface, &size) < 0)
-        throwErrno("::getsockopt(SO_BINDTODEVICE)");
+        throw SystemException("::getsockopt(SO_BINDTODEVICE)");
     iface[size < IFNAMSIZ ? size : IFNAMSIZ-1] = 0;
     return iface;
 }