From 181799f2ca48edc979b927c23d9c43a99f2bd4c4 Mon Sep 17 00:00:00 2001
From: tho <tho@wiback.org>
Date: Sat, 1 Mar 2008 18:08:47 +0000
Subject: [PATCH] added more meaningful exception text

---
 Socket/NetdeviceController.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Socket/NetdeviceController.cc b/Socket/NetdeviceController.cc
index b93998c04..fc43cc1dd 100644
--- a/Socket/NetdeviceController.cc
+++ b/Socket/NetdeviceController.cc
@@ -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
 {
-- 
GitLab