Commit 4ee17e23 authored by Scott Wolchok's avatar Scott Wolchok Committed by Facebook GitHub Bot

Convert throw in IPAddress to throw_exception

Summary: Unbreak -fno-exceptions support for this file.

Reviewed By: yfeldblum

Differential Revision: D21043400

fbshipit-source-id: aceea45c32d143c723ad6bae68a7403f14d7e0f2
parent 8a5981ec
......@@ -289,7 +289,7 @@ class IPAddress {
// Populate sockaddr_storage with an appropriate value
int toSockaddrStorage(sockaddr_storage* dest, uint16_t port = 0) const {
if (dest == nullptr) {
throw IPAddressFormatException("dest must not be null");
throw_exception<IPAddressFormatException>("dest must not be null");
}
memset(dest, 0, sizeof(sockaddr_storage));
dest->ss_family = family();
......@@ -312,7 +312,7 @@ class IPAddress {
#endif
return sizeof(*sin);
} else {
throw InvalidAddressFamilyException(family());
throw_exception<InvalidAddressFamilyException>(family());
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment