X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FSocket%2FProtocols%2FINet%2FINetAddressing.cc;h=aead331b741176a980f13acac9c7009f002cd22d;hb=afae50abf125df375ff1610b7a659f9b1da61bc0;hp=e224408f1bc827a32764ee78eb36985c8873681f;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/Socket/Protocols/INet/INetAddressing.cc b/senf/Socket/Protocols/INet/INetAddressing.cc index e224408..aead331 100644 --- a/senf/Socket/Protocols/INet/INetAddressing.cc +++ b/senf/Socket/Protocols/INet/INetAddressing.cc @@ -34,7 +34,8 @@ #include #include #include -#include "../../../Utils/senfassert.hh" +#include +#include //#include "INetAddressing.mpp" #define prefix_ @@ -52,7 +53,7 @@ prefix_ senf::INet4SocketAddress::INet4SocketAddress(std::string const & addr) ? addr : std::string(addr,portIx+1)) ); } catch (boost::bad_lexical_cast const &) { - throw AddressSyntaxException() << "invalid port number"; + throw AddressSyntaxException(addr) << ": invalid port number"; } if (portIx != std::string::npos) address( INet4Address::from_string(std::string(addr,0,portIx)) ); @@ -111,7 +112,7 @@ prefix_ senf::INet6SocketAddress::INet6SocketAddress(std::string const & addr, boost::smatch match; if (! regex_match(addr, match, addressRx)) - throw AddressSyntaxException(); + throw AddressSyntaxException(addr); if (match[ZoneId].matched) assignIface(match[ZoneId]); @@ -147,7 +148,7 @@ prefix_ void senf::INet6SocketAddress::assignIface(std::string const & iface) else { sockaddr_.sin6_scope_id = if_nametoindex(iface.c_str()); if (sockaddr_.sin6_scope_id == 0) - throw AddressSyntaxException(); + throw AddressSyntaxException(iface); } } @@ -179,7 +180,7 @@ prefix_ std::istream & senf::operator>>(std::istream & is, INet6SocketAddress & #undef prefix_ //#include "INetAddressing.mpp" - + // Local Variables: // mode: c++ // fill-column: 100