Summary
The browser event window.onerror can be used to capture and report JavaScript errors.
1
It is an easy way to log client-side errors and report them to servers.
1
It is also a major mechanism for Sentry's client JavaScript integration (raven-js).
1
This makes it a useful tool for catching console errors.
According to