@@ -13,17 +13,17 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" + +#include #import "OFListenFailedException.h" #import "OFString.h" #import "OFTCPSocket.h" -#import "OFNotImplementedException.h" - #import "common.h" @implementation OFListenFailedException + (instancetype)exceptionWithClass: (Class)class_ socket: (OFTCPSocket*)socket @@ -34,14 +34,17 @@ backLog: backlog] autorelease]; } - initWithClass: (Class)class_ { - Class c = [self class]; - [self release]; - @throw [OFNotImplementedException exceptionWithClass: c - selector: _cmd]; + @try { + [self doesNotRecognizeSelector: _cmd]; + abort(); + } @catch (id e) { + [self release]; + @throw e; + } } - initWithClass: (Class)class_ socket: (OFTCPSocket*)socket_ backLog: (int)backlog