摘要: 上一节promise中漏了一个知识点: promise对象可以使用catch来避免每个then中都加error判断,让错误时都进到catch中进行打印错误信息 因为进的事reject,所以不会进then的data,将进入catch进行打印错误。 catch与then同级,err从reject中传出 阅读全文
posted @ 2018-07-01 19:05 herry菌 阅读(458) 评论(0) 推荐(0) 编辑