X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FSocket%2FProtocols%2FINet%2FINet4Address.cc;h=d00dee2df49193da1b65ae9bcb3b7d5b2714a2b1;hb=61b2e2ea5cb50df90931acf3fcd840493ba762a9;hp=0e5638245d5c7a9ceb3174a38141de3b973889f7;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/Socket/Protocols/INet/INet4Address.cc b/senf/Socket/Protocols/INet/INet4Address.cc index 0e56382..d00dee2 100644 --- a/senf/Socket/Protocols/INet/INet4Address.cc +++ b/senf/Socket/Protocols/INet/INet4Address.cc @@ -34,6 +34,7 @@ #if defined(_REENTRANT) && !defined(__GLIBC__) #include #endif +#include //#include "INet4Address.mpp" #define prefix_ @@ -54,7 +55,7 @@ prefix_ senf::INet4Address senf::INet4Address::from_string(std::string const & s return senf::INet4Address::from_inaddr(ina.s_addr); if (s.empty()) - throw AddressSyntaxException(); + throw AddressSyntaxException() << ": empty string"; int herr (0); @@ -129,11 +130,11 @@ prefix_ senf::INet4Network::INet4Network(std::string const & s) { std::string::size_type i (s.find('/')); if (i == std::string::npos) - throw AddressSyntaxException(); + throw AddressSyntaxException(s); try { prefix_len_ = boost::lexical_cast(std::string(s,i+1)); } catch (boost::bad_lexical_cast const &) { - throw AddressSyntaxException(); + throw AddressSyntaxException(s); } address_ = INet4Address(INet4Address::from_string(std::string(s, 0, i)).address() & mask()); } @@ -184,7 +185,7 @@ prefix_ std::istream & senf::operator>>(std::istream & is, INet4Network & addr) #undef prefix_ //#include "INet4Address.mpp" - + // Local Variables: // mode: c++ // fill-column: 100