标题: Exceptions are used for programmer errors [打印本页] 作者: flyfuckadmin 时间: 2014-10-16 10:51 标题: Exceptions are used for programmer errors Objective C supports exceptions in much the same way as other programming languages,with a similar syntax to Java or C++.
eg:
@try{
//do something that might throw an exception
}
@catch(NSException *exception){
//deal with the exception
}
@finally{
//option block of clean-up code
//excuted whether or not an exception occurred
}