黑马程序员技术交流社区

标题: 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
}






欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2