#include <boost/lexical_cast.hpp>
#include <boost/regex.hpp>
#include <senf/Utils/senfassert.hh>
+#include <senf/Socket/Protocols/AddressExceptions.hh>
//#include "INetAddressing.mpp"
#define prefix_
? 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)) );
boost::smatch match;
if (! regex_match(addr, match, addressRx))
- throw AddressSyntaxException();
+ throw AddressSyntaxException(addr);
if (match[ZoneId].matched)
assignIface(match[ZoneId]);
else {
sockaddr_.sin6_scope_id = if_nametoindex(iface.c_str());
if (sockaddr_.sin6_scope_id == 0)
- throw AddressSyntaxException();
+ throw AddressSyntaxException(iface);
}
}
#undef prefix_
//#include "INetAddressing.mpp"
-
+\f
// Local Variables:
// mode: c++
// fill-column: 100