Socket: added UnknownInterfaceException
[senf.git] / senf / Socket / Protocols / AddressExceptions.hh
index bf7f605..87788d3 100644 (file)
@@ -1,6 +1,6 @@
 // $Id$
 //
-// Copyright (C) 2008 
+// Copyright (C) 2008
 // Fraunhofer Institute for Open Communication Systems (FOKUS)
 // Competence Center NETwork research (NET), St. Augustin, GERMANY
 //     Stefan Bund <g0dil@berlios.de>
@@ -46,19 +46,27 @@ namespace senf {
     struct AddressSyntaxException : public AddressException
     {
         AddressSyntaxException() : AddressException("invalid address syntax") {}
-        AddressSyntaxException(const std::string &addr)
+        AddressSyntaxException(std::string const & addr)
             : AddressException("Invalid address syntax (\"" + addr + "\")") {}
     };
 
     /** \brief Resolver failure */
     struct UnknownHostnameException : public AddressException
-    { 
-        UnknownHostnameException() : AddressException("failed to resolve hostname") {} 
-        UnknownHostnameException(const std::string &hostname)
+    {
+        UnknownHostnameException() : AddressException("failed to resolve hostname") {}
+        UnknownHostnameException(std::string const & hostname)
             : AddressException("Failed to resolve hostname (\"" + hostname + "\")") {}
     };
 
-}        
+    /** \brief Unknown interface */
+    struct UnknownInterfaceException : public AddressException
+    {
+        UnknownInterfaceException() : AddressException("Unknown interface") {}
+        UnknownInterfaceException(std::string const & interface)
+            : AddressException("Unknown interface (\"" + interface + "\")") {}
+    };
+
+}
 
 ///////////////////////////////hh.e////////////////////////////////////////
 //#include "AddressExceptions.cci"