We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
只能捕获同步代码
window.onerror = function (msg, url, row, col, error) { console.log("我已经捕获到错误"); console.log(msg, url, row, col, error); return true; }
资源错误:window.addEventListener("error")
window.addEventListener("error")
捕获 promise reject
// 捕获错误 process.on('uncaughtException', err => { //do something }) // promise process.on('unhandledRejection', err => { //do something })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
try catch
只能捕获同步代码
window.onerror
资源错误:
window.addEventListener("error")
addEventListener("unhandledrejection")
捕获 promise reject
node
The text was updated successfully, but these errors were encountered: