@@ -21,18 +21,16 @@ #import "OFThreadStartFailedException.h" #import "OFString.h" #import "OFThread.h" @implementation OFThreadStartFailedException -+ (instancetype)exceptionWithClass: (Class)class - thread: (OFThread*)thread ++ (instancetype)exceptionWithThread: (OFThread*)thread { - return [[[self alloc] initWithClass: class - thread: thread] autorelease]; + return [[[self alloc] initWithThread: thread] autorelease]; } -- initWithClass: (Class)class +- init { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @@ -40,14 +38,13 @@ } abort(); } -- initWithClass: (Class)class - thread: (OFThread*)thread +- initWithThread: (OFThread*)thread { - self = [super initWithClass: class]; + self = [super init]; _thread = [thread retain]; return self; } @@ -60,13 +57,13 @@ } - (OFString*)description { return [OFString stringWithFormat: - @"Starting a thread of class %@ failed!", _inClass]; + @"Starting a thread of type %@ failed!", [_thread class]]; } - (OFThread*)thread { OF_GETTER(_thread, false) } @end