@@ -22,18 +22,16 @@ #import "OFString.h" #import "common.h" @implementation OFEnumerationMutationException -+ (instancetype)exceptionWithClass: (Class)class - object: (id)object ++ (instancetype)exceptionWithObject: (id)object { - return [[[self alloc] initWithClass: class - object: object] autorelease]; + return [[[self alloc] initWithObject: object] autorelease]; } -- initWithClass: (Class)class +- init { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @@ -41,14 +39,13 @@ } abort(); } -- initWithClass: (Class)class - object: (id)object +- initWithObject: (id)object { - self = [super initWithClass: class]; + self = [super init]; _object = [object retain]; return self; } @@ -61,13 +58,14 @@ } - (OFString*)description { return [OFString stringWithFormat: - @"Object of class %@ was mutated during enumeration!", _inClass]; + @"Object of class %@ was mutated during enumeration!", + [_object class]]; } - (id)object { OF_GETTER(_object, false) } @end