@@ -23,18 +23,16 @@ #import "OFStream.h" #import "common.h" @implementation OFSetOptionFailedException -+ (instancetype)exceptionWithClass: (Class)class - stream: (OFStream*)stream ++ (instancetype)exceptionWithStream: (OFStream*)stream { - return [[[self alloc] initWithClass: class - stream: stream] autorelease]; + return [[[self alloc] initWithStream: stream] autorelease]; } -- initWithClass: (Class)class +- init { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @@ -42,14 +40,13 @@ } abort(); } -- initWithClass: (Class)class - stream: (OFStream*)stream +- initWithStream: (OFStream*)stream { - self = [super initWithClass: class]; + self = [super init]; _stream = [stream retain]; return self; } @@ -62,13 +59,14 @@ } - (OFString*)description { return [OFString stringWithFormat: - @"Setting an option in class %@ failed!", _inClass]; + @"Setting an option in a stream of type %@ failed!", + [_stream class]]; } - (OFStream*)stream { OF_GETTER(_stream, false) } @end