Index: src/OFTCPSocket.m ================================================================== --- src/OFTCPSocket.m +++ src/OFTCPSocket.m @@ -71,14 +71,15 @@ hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; snprintf(portstr, 6, "%d", port); - if (getaddrinfo(host, portstr, &hints, &res0)) { - /* FIXME: Throw exception */ - return nil; - } + if (getaddrinfo(host, portstr, &hints, &res0)) + @throw [OFAddressTranslationFailedException + newWithObject: self + andNode: host + andService: portstr]; for (res = res0; res != NULL; res = res->ai_next) { if ((sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) < 0) continue; @@ -124,14 +125,15 @@ hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; snprintf(portstr, 6, "%d", port); - if (getaddrinfo(host, portstr, &hints, &res)) { - /* FIXME: Throw exception */ - return nil; - } + if (getaddrinfo(host, portstr, &hints, &res)) + @throw [OFAddressTranslationFailedException + newWithObject: self + andNode: host + andService: portstr]; if (bind(sock, res->ai_addr, res->ai_addrlen) < 0) { /* FIXME: Throw exception */ freeaddrinfo(res); return nil;