Index: src/exceptions/OFAlreadyConnectedException.m ================================================================== --- src/exceptions/OFAlreadyConnectedException.m +++ src/exceptions/OFAlreadyConnectedException.m @@ -28,22 +28,10 @@ + (instancetype)exceptionWithSocket: (OFTCPSocket*)socket { return [[[self alloc] initWithSocket: socket] autorelease]; } -- init -{ - @try { - [self doesNotRecognizeSelector: _cmd]; - } @catch (id e) { - [self release]; - @throw e; - } - - abort(); -} - - initWithSocket: (OFTCPSocket*)socket { self = [super init]; _socket = [socket retain]; @@ -58,15 +46,19 @@ [super dealloc]; } - (OFString*)description { - return [OFString stringWithFormat: - @"The socket of type %@ is already connected or bound and thus " - @"can't be connected or bound again!", [_socket class]]; + if (_socket) + return [OFString stringWithFormat: + @"The socket of type %@ is already connected or bound and " + @"thus can't be connected or bound again!", + [_socket class]]; + else + return @"A connection has already been established!"; } - (OFTCPSocket*)socket { OF_GETTER(_socket, false) } @end