前端捕获异常问题

阅读次数 1

是测试应用文件超过了5M,直接页面报错了变成了下图,怎么才能捕获异常,我是挂载到当页一个元素上的 <img src="https://solution-community.wps.cn/uploads/post/5gB4tS1MbG1.png" alt="image.png"/>

<img src="https://solution-community.wps.cn/uploads/post/5gB4xdJ4RRJ.png" alt="image.png"/> <img src="https://solution-community.wps.cn/uploads/post/5gB4RNVF3Au.png" alt="image.png"/>

2 Answers

open/wpp接口报错了。直接在页面体现出来不太好,怎么捕获异常,不要直接把后续的报错体现在页面上 <img src="https://solution-community.wps.cn/uploads/post/5gBbwECFuNd.png" alt="image.png"/> <img src="https://solution-community.wps.cn/uploads/post/5gBbz3uMHe3.png" alt="image.png"/>

你好,文件大小超出时页面是有错误页显示的,看您截的图像是您本地调试环境报错<img src="https://solution-community.wps.cn/uploads/post/5gBcXfGs31G.png" alt="image.png"/>