@@ -23,22 +23,20 @@ #import "OFSeekableStream.h" #import "common.h" @implementation OFSeekFailedException -+ (instancetype)exceptionWithClass: (Class)class - stream: (OFSeekableStream*)stream - offset: (off_t)offset - whence: (int)whence -{ - return [[[self alloc] initWithClass: class - stream: stream - offset: offset - whence: whence] autorelease]; ++ (instancetype)exceptionWithStream: (OFSeekableStream*)stream + offset: (off_t)offset + whence: (int)whence +{ + return [[[self alloc] initWithStream: stream + offset: offset + whence: whence] autorelease]; } -- initWithClass: (Class)class +- init { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @@ -46,16 +44,15 @@ } abort(); } -- initWithClass: (Class)class - stream: (OFSeekableStream*)stream - offset: (off_t)offset - whence: (int)whence +- initWithStream: (OFSeekableStream*)stream + offset: (off_t)offset + whence: (int)whence { - self = [super initWithClass: class]; + self = [super init]; _stream = [stream retain]; _offset = offset; _whence = whence; _errNo = GET_ERRNO; @@ -71,11 +68,12 @@ } - (OFString*)description { return [OFString stringWithFormat: - @"Seeking failed in class %@! " ERRFMT, _inClass, ERRPARAM]; + @"Seeking failed in stream of type %@! " ERRFMT, [_stream class], + ERRPARAM]; } - (OFSeekableStream*)stream { OF_GETTER(_stream, false)