Front-end misclassification:
Immediate run error: Code error
resource loading error
Wrong way to catch:
How to catch the error on the fly:
try.catch window.onerror
Resource loading error:
object.onerror This error will not bubble up and needs to be monitored in capture mode
performance.getEntries Get the loading market of loaded resources, you can indirectly get the unloaded resources
Error event capture window.addEventListener('error', function(e){ }, true) must be event capture
Rationale for reporting errors:
Report using ajax communication
Use the image object to report (new Image()).src = '//baidu.com?error=one'