@@ -21,18 +21,16 @@ #import "OFThreadStillRunningException.h" #import "OFString.h" #import "OFThread.h" @implementation OFThreadStillRunningException -+ (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; } @@ -61,13 +58,13 @@ - (OFString*)description { return [OFString stringWithFormat: @"Deallocation of a thread of type %@ was tried, even though it " - @"was still running!", _inClass]; + @"was still running!", [_thread class]]; } - (OFThread*)thread { OF_GETTER(_thread, false) } @end