@@ -643,11 +643,11 @@ } #endif - init { - Class c = isa; + Class c = [self class]; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } @@ -660,17 +660,17 @@ int flags; if ((flags = parse_mode([mode cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) == -1) @throw [OFInvalidArgumentException - exceptionWithClass: isa + exceptionWithClass: [self class] selector: _cmd]; if ((fileDescriptor = open([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE], flags, DEFAULT_MODE)) == -1) @throw [OFOpenFileFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] path: path mode: mode]; closable = YES; } @catch (id e) { @@ -703,11 +703,11 @@ { ssize_t ret; if (fileDescriptor == -1 || atEndOfStream || (ret = read(fileDescriptor, buffer, length)) < 0) - @throw [OFReadFailedException exceptionWithClass: isa + @throw [OFReadFailedException exceptionWithClass: [self class] stream: self requestedLength: length]; if (ret == 0) atEndOfStream = YES; @@ -718,19 +718,19 @@ - (void)_writeBuffer: (const void*)buffer length: (size_t)length { if (fileDescriptor == -1 || atEndOfStream || write(fileDescriptor, buffer, length) < length) - @throw [OFWriteFailedException exceptionWithClass: isa + @throw [OFWriteFailedException exceptionWithClass: [self class] stream: self requestedLength: length]; } - (void)_seekToOffset: (off_t)offset { if (lseek(fileDescriptor, offset, SEEK_SET) == -1) - @throw [OFSeekFailedException exceptionWithClass: isa + @throw [OFSeekFailedException exceptionWithClass: [self class] stream: self offset: offset whence: SEEK_SET]; } @@ -737,11 +737,11 @@ - (off_t)_seekForwardWithOffset: (off_t)offset { off_t ret; if ((ret = lseek(fileDescriptor, offset, SEEK_CUR)) == -1) - @throw [OFSeekFailedException exceptionWithClass: isa + @throw [OFSeekFailedException exceptionWithClass: [self class] stream: self offset: offset whence: SEEK_CUR]; return ret; @@ -750,11 +750,11 @@ - (off_t)_seekToOffsetRelativeToEnd: (off_t)offset { off_t ret; if ((ret = lseek(fileDescriptor, offset, SEEK_END)) == -1) - @throw [OFSeekFailedException exceptionWithClass: isa + @throw [OFSeekFailedException exceptionWithClass: [self class] stream: self offset: offset whence: SEEK_END]; return ret; @@ -791,11 +791,11 @@ } - initWithPath: (OFString*)path mode: (OFString*)mode { - Class c = isa; + Class c = [self class]; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } @@ -818,28 +818,28 @@ return OF_RETAIN_COUNT_MAX; } - (void)dealloc { - @throw [OFNotImplementedException exceptionWithClass: isa + @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; [super dealloc]; /* Get rid of stupid warning */ } - (void)_seekToOffset: (off_t)offset { - @throw [OFNotImplementedException exceptionWithClass: isa + @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; } - (off_t)_seekForwardWithOffset: (off_t)offset { - @throw [OFNotImplementedException exceptionWithClass: isa + @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; } - (off_t)_seekToOffsetRelativeToEnd: (off_t)offset { - @throw [OFNotImplementedException exceptionWithClass: isa + @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; } @end