@@ -59,14 +59,12 @@ onPort: (uint16_t)port { struct addrinfo hints, *res, *res0; char portstr[6]; - if (!port) { - /* FIXME: Throw exception */ - return nil; - } + if (!port) + @throw [OFInvalidPortException newWithObject: self]; if (sock >= 0) @throw [OFAlreadyConnectedException newWithObject: self]; memset(&hints, 0, sizeof(struct addrinfo)); @@ -109,14 +107,12 @@ andFamily: (int)family { struct addrinfo hints, *res; char portstr[6]; - if (!port) { - /* FIXME: Throw exception */ - return nil; - } + if (!port) + @throw [OFInvalidPortException newWithObject: self]; if (sock >= 0) @throw [OFAlreadyConnectedException newWithObject: self]; if ((sock = socket(family, SOCK_STREAM, 0)) < 0) {