From: Dave Watson Date: Mon, 22 Sep 2014 22:18:51 +0000 (-0700) Subject: fix unittest X-Git-Tag: v0.22.0~334 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c141ff51b74583211355a4e367a34bc4b1d29094;p=folly.git fix unittest 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 --- diff --git a/folly/SocketAddress.cpp b/folly/SocketAddress.cpp index b8ce1ea8..4834a134 100644 --- a/folly/SocketAddress.cpp +++ b/folly/SocketAddress.cpp @@ -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; }