try catch 嵌套

1. 当try中代码去调用另一函数,该函数也存在try catch时,在该函数的catch中抛出error即可被外层catch捕获到

 

 2. 内层没有catch时,异常直接被最近的catch捕获到

 

posted @ 2019-05-14 20:41  Mr_Kahn  阅读(369)  评论(0)    收藏  举报