fix unittest
authorDave Watson <davejwatson@fb.com>
Mon, 22 Sep 2014 22:18:51 +0000 (15:18 -0700)
committerAnton Likhtarov <alikhtarov@fb.com>
Fri, 26 Sep 2014 22:22:12 +0000 (15:22 -0700)
Summary: Looks like the test explicitly looks for InvalidAddressFamilyException.  I don't think any users are depending on this particular error type either way, I just switched it to InvalidAddressFamilyException

Test Plan:
unit tests

Reviewed By: ldbrandy@fb.com

Subscribers: doug, njormrod

FB internal diff: D1570363

Tasks: 5153819

folly/SocketAddress.cpp

index b8ce1ea83cf465f5a37541351305fdda7ea1cc98..4834a134a86307f3411eb4ca0fae3a37f5457dc7 100644 (file)
@@ -290,7 +290,7 @@ void SocketAddress::setFromSockaddr(const struct sockaddr_un* address,
 const folly::IPAddress& SocketAddress::getIPAddress() const {
   auto family = getFamily();
   if (family != AF_INET && family != AF_INET6) {
-    throw std::invalid_argument("getIPAddress called on a non-ip address");
+    throw InvalidAddressFamilyException(family);
   }
   return storage_.addr;
 }