mounted () {
window.onerror = function (errorMessage, scriptURI, lineNumber, columnNumber, errorObj) {
let postData = {}
// eslint-disable-next-line //不使用eslint规范
postData.content = "错误信息:" + errorMessage + "出错文件:" + scriptURI + "出错行号:" + lineNumber + "出错列号:" + columnNumber + "错误详情:" + errorObj
addError(postData) /记录错误信息的接口
}
}
JS的错误信息记录
最新推荐文章于 2024-03-18 17:01:20 发布