-1

我使用来自 github 的 Objective-Zip - https://github.com/flyingdolphinstudio/Objective-Zip 如果 zip 文件损坏,我有这个:

Terminating app due to uncaught exception 'ZipException', reason: 'Can't open

之后应用程序崩溃。如何得到错误但程序没有下降?

4

1 回答 1

1

只需捕获异常:

@try {
    // Zip code here
}
@catch (ZipException *exception) {
    // Error happened, do whatever you need
}
于 2014-10-27T21:33:49.973 回答