window.onerror = function(errorMsg,url,lineNumber,columnNumber,errorObj){};

window.onunhandledrejection = function(){};

console.error = function(){};

参考文章:https://zhuanlan.zhihu.com/p/35771536