@@ -568,10 +568,11 @@ { size_t ret; if (fd == -1 || eos) @throw [OFReadFailedException newWithClass: isa + stream: self requestedSize: size]; if ((ret = read(fd, buf, size)) == 0) eos = YES; return ret; @@ -582,37 +583,41 @@ { size_t ret; if (fd == -1 || eos || (ret = write(fd, buf, size)) < size) @throw [OFWriteFailedException newWithClass: isa + stream: self requestedSize: size]; return ret; } - (void)_seekToOffset: (off_t)offset { if (lseek(fd, offset, SEEK_SET) == -1) - @throw [OFSeekFailedException newWithClass: isa]; + @throw [OFSeekFailedException newWithClass: isa + stream: self]; } - (off_t)_seekForwardWithOffset: (off_t)offset { off_t ret; if ((ret = lseek(fd, offset, SEEK_CUR)) == -1) - @throw [OFSeekFailedException newWithClass: isa]; + @throw [OFSeekFailedException newWithClass: isa + stream: self]; return ret; } - (off_t)_seekToOffsetRelativeToEnd: (off_t)offset { off_t ret; if ((ret = lseek(fd, offset, SEEK_END)) == -1) - @throw [OFSeekFailedException newWithClass: isa]; + @throw [OFSeekFailedException newWithClass: isa + stream: self]; return ret; } - (int)fileDescriptor