第十四章 错误和异常
摘要:
搞懂下面这些情况的异常处理情况就OK了!try { // Point A try { //Point B } catch { //Point C } finally { // clean up } // Point D }catch { //error handling }finally { // clean up }1. 如果在A.D出发生异常,则有外层Catch捕捉和外层 finally处理2.如果在B出抛出,且有一个合适的内层Catch处理,就会执行内层的catch及finally3.如果在B出抛出,内层没有合适的catch捕捉,则执行内层的finally块,退出内层try块,继续搜索外 阅读全文
posted @ 2011-03-16 15:41 小齐宝 阅读(131) 评论(0) 推荐(0)