Network request error caught
Method 1: XHR hack
The principle is simple: reference functions on the prototype chain and add callback functions to load,error, and abort events before send to gather information about each network request.
Note: The hack open method is needed to ensure that the network request status will not be reported if the network request is made directly to the monitoring address, so as to avoid an endless loop.
Method 2:
If you use the Axios library, you can report the status of the network request in the interceptor.
Error handling of Vue projects
As reflected below, window. onError does not catch vue errors, which requires further testing
Segmentfault.com/q/101000002…
Blog.fundebug.com/2019/06/17/…
SourceMap location error:
www.zhihu.com/question/28…