@@ -26,15 +26,10 @@ + (instancetype)exceptionWithThread: (OFThread*)thread { return [[[self alloc] initWithThread: thread] autorelease]; } -- init -{ - OF_INVALID_INIT_METHOD -} - - initWithThread: (OFThread*)thread { self = [super init]; _thread = [thread retain]; @@ -49,10 +44,15 @@ [super dealloc]; } - (OFString*)description { - return [OFString stringWithFormat: - @"Joining a thread of type %@ failed! Most likely, another thread " - @"already waits for the thread to join.", [_thread class]]; + if (_thread != nil) + return [OFString stringWithFormat: + @"Joining a thread of type %@ failed! Most likely, another " + @"thread already waits for the thread to join.", + [_thread class]]; + else + return @"Joining a thread failed! Most likely, another thread " + @"already waits for the thread to join."; } @end