Catching exceptions in objective-c
Is there some sort of开发者_如何学Python try/catch function in obj-c? I'm trying to load saved files from an array and would like to have some sort of message popping up instead of the app crashing in case the array is empty. Whats the best and optimal way to do this?
@try {
//Code
}
@catch (id theException) {
//Code
}
@finally {
//Code
}
Or you can test if the array is empty ...
精彩评论