@@ -35,11 +35,10 @@ #import "OFChecksumMismatchException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFNotImplementedException.h" #import "OFNotOpenException.h" -#import "OFOpenItemFailedException.h" #import "OFOutOfRangeException.h" #import "OFSeekFailedException.h" #import "OFTruncatedDataException.h" #import "OFUnsupportedVersionException.h" #import "OFWriteFailedException.h" @@ -440,13 +439,11 @@ if (_mode != modeRead) @throw [OFInvalidArgumentException exception]; if ((entry = [_pathToEntryMap objectForKey: path]) == nil) - @throw [OFOpenItemFailedException exceptionWithPath: path - mode: @"r" - errNo: ENOENT]; + @throw [OFInvalidArgumentException exception]; [self of_closeLastReturnedStream]; offset64 = entry.of_localFileHeaderOffset; if (offset64 < 0 || (OFFileOffset)offset64 != offset64) @@ -496,14 +493,11 @@ pool = objc_autoreleasePoolPush(); entry = [[entry_ mutableCopy] autorelease]; if ([_pathToEntryMap objectForKey: entry.fileName] != nil) - @throw [OFOpenItemFailedException - exceptionWithPath: entry.fileName - mode: @"w" - errNo: EEXIST]; + @throw [OFInvalidArgumentException exception]; if (entry.compressionMethod != OFZIPArchiveEntryCompressionMethodNone) @throw [OFNotImplementedException exceptionWithSelector: _cmd object: self];