Merge pull request #48 from andyj-at-aspin/Swift3ExceptionThrowing

Changed throwing of Swift errors
This commit is contained in:
Gianluca Bertani
2016-08-28 10:59:34 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -231,7 +231,7 @@ static const NSInteger OZLocateFileResultFound= 1;
@throws OZZipException If the zip file has been opened with a mode other than
Unzip.
*/
- (NSInteger) __attribute__((swift_error(zero_result))) locateFileInZip:(nonnull NSString *)fileNameInZip error:(NSError * __autoreleasing __nullable * __nullable)error;
- (NSInteger) __attribute__((swift_error(nonnull_error))) locateFileInZip:(nonnull NSString *)fileNameInZip error:(NSError * __autoreleasing __nullable * __nullable)error;
/**
@brief Returns the number of files contained in the zip file.
@@ -242,7 +242,7 @@ static const NSInteger OZLocateFileResultFound= 1;
@throws OZZipException If the zip file has been opened with a mode other
than Unzip.
*/
- (NSUInteger) __attribute__((swift_error(zero_result))) numFilesInZipWithError:(NSError * __autoreleasing __nullable * __nullable)error;
- (NSUInteger) __attribute__((swift_error(nonnull_error))) numFilesInZipWithError:(NSError * __autoreleasing __nullable * __nullable)error;
/**
@brief Returns a list of OZFileInZipInfo with the information on all the files
+1 -1
View File
@@ -58,7 +58,7 @@ static const NSInteger OZReadStreamResultEndOfFile= -1;
<br/>NOTE: return value convention is different in the standard (non-NSError
compliant) interface.
*/
- (NSInteger) __attribute__((swift_error(zero_result))) readDataWithBuffer:(nonnull NSMutableData *)buffer error:(NSError * __autoreleasing __nullable * __nullable)error;
- (NSInteger) __attribute__((swift_error(nonnull_error))) readDataWithBuffer:(nonnull NSMutableData *)buffer error:(NSError * __autoreleasing __nullable * __nullable)error;
/**
@brief Closes the read steam.