try catch else finally 捕获异常的方法
参考: https://www.w3school.com.cn/js/js_errors.asp
现在有 else了
try:
代码块
except:
try报错执行这块
else:
try没有报错 继续执行else这块
finally:
均会执行这块
参考: https://www.w3school.com.cn/js/js_errors.asp
现在有 else了
try:
代码块
except:
try报错执行这块
else:
try没有报错 继续执行else这块
finally:
均会执行这块