diff options
Diffstat (limited to 'src/Net/IPAddress.cpp')
-rw-r--r-- | src/Net/IPAddress.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Net/IPAddress.cpp b/src/Net/IPAddress.cpp index 6bf79a3..eb9d3be 100644 --- a/src/Net/IPAddress.cpp +++ b/src/Net/IPAddress.cpp @@ -36,7 +36,7 @@ IPAddress::IPAddress(uint32_t address, uint16_t port0) : addr(address), port(por sa.sin_addr.s_addr = htonl(addr); } -IPAddress::IPAddress(const std::string &address) throw(Common::Exception) { +IPAddress::IPAddress(const std::string &address) throw(Exception) { std::string ip; size_t pos = address.find_first_of(':'); @@ -51,7 +51,7 @@ IPAddress::IPAddress(const std::string &address) throw(Common::Exception) { char *endptr; port = std::strtol(address.substr(pos+1).c_str(), &endptr, 10); if(*endptr != 0 || port == 0) - throw Common::Exception(Common::Exception::INVALID_ADDRESS); + throw Exception(Exception::INVALID_ADDRESS); } sa.sin_family = AF_INET; @@ -60,17 +60,17 @@ IPAddress::IPAddress(const std::string &address) throw(Common::Exception) { if(ip == "*") sa.sin_addr.s_addr = INADDR_ANY; else if(!inet_pton(AF_INET, ip.c_str(), &sa.sin_addr)) - throw Common::Exception(Common::Exception::INVALID_ADDRESS); + throw Exception(Exception::INVALID_ADDRESS); addr = ntohl(sa.sin_addr.s_addr); } -IPAddress::IPAddress(const std::string &address, uint16_t port0) throw(Common::Exception) : port(port0) { +IPAddress::IPAddress(const std::string &address, uint16_t port0) throw(Exception) : port(port0) { sa.sin_family = AF_INET; sa.sin_port = htons(port); if(!inet_pton(AF_INET, address.c_str(), &sa.sin_addr)) - throw Common::Exception(Common::Exception::INVALID_ADDRESS); + throw Exception(Exception::INVALID_ADDRESS); addr = ntohl(sa.sin_addr.s_addr); } |