/** \file
\brief AddressExceptions public header */
-#ifndef HH_AddressExceptions_
-#define HH_AddressExceptions_ 1
+#ifndef HH_SENF_Socket_Protocols_AddressExceptions_
+#define HH_SENF_Socket_Protocols_AddressExceptions_ 1
// Custom includes
#include "../Utils/Exception.hh"
struct AddressSyntaxException : public AddressException
{
AddressSyntaxException() : AddressException("invalid address syntax") {}
- AddressSyntaxException(std::string const & msg) : AddressException(msg) {}
+ AddressSyntaxException(const std::string &addr)
+ : AddressException("Invalid address syntax (\"" + addr + "\")") {}
};
/** \brief Resolver failure */
struct UnknownHostnameException : public AddressException
{
UnknownHostnameException() : AddressException("failed to resolve hostname") {}
- UnknownHostnameException(std::string const & msg) : AddressException(msg) {}
+ UnknownHostnameException(const std::string &hostname)
+ : AddressException("Failed to resolve hostname (\"" + hostname + "\")") {}
};
}