added more meaningful exception text
tho [Sat, 1 Mar 2008 18:08:47 +0000 (18:08 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@723 270642c3-0616-0410-b53a-bc976706d245

Socket/NetdeviceController.cc

index b93998c..fc43cc1 100644 (file)
@@ -101,7 +101,7 @@ prefix_ void senf::NetdeviceController::openSocket()
 {
     sockfd_ = ::socket( PF_INET, SOCK_DGRAM, 0);
     if ( sockfd_ < 0)
-        throw SystemException();
+        throw SystemException( "Could not open socket for NetdeviceController");
 }
 
 prefix_ void senf::NetdeviceController::ifrName(ifreq& ifr)
@@ -110,10 +110,10 @@ prefix_ void senf::NetdeviceController::ifrName(ifreq& ifr)
     ::memset( &ifr, 0, sizeof(ifr));
     ifr.ifr_ifindex = ifindex_;
     if ( ::ioctl( sockfd_, SIOCGIFNAME, &ifr ) < 0 )
-        throw SystemException();
+        throw SystemException( 
+                       "NetdeviceController: Could not discover the name of the interface with index ") << ifindex_;
 }
 
-
 prefix_ void senf::NetdeviceController::doIoctl(ifreq& ifr, int request)
     const
 {