@@ -320,8 +320,22 @@ return string; asprintf(&string, "The socket of type %s is already connected or bound " "and thus can't be connected or bound again!", [object name]); + return string; +} +@end + +@implementation OFInvalidPortException +- (char*)cString +{ + if (string != NULL) + return string; + + asprintf(&string, "The port specified is not valid for a socket of " + "type %s! This usually means you tried to use port 0, which is an " + "invalid port.", [object name]); + return string; } @end