try ..catch语句用法

try...catch作用是测试代码中的错误!

try{

   //在此运行代码

}

catch (err){

  //在此处理错误

}

原文地址:https://www.cnblogs.com/dxsghr/p/6823624.html