-1

I use Objective-Zip from github - https://github.com/flyingdolphinstudio/Objective-Zip If zip file broken i have this:

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

And app crash after that. How to get the error but the program did not fall?

DimonDeveloper
  • 137
  • 1
  • 13

1 Answers1

1

Simply catch the exception:

@try {
    // Zip code here
}
@catch (ZipException *exception) {
    // Error happened, do whatever you need
}
rmaddy
  • 314,917
  • 42
  • 532
  • 579