Created by: Timer
If you would like to help, please see https://github.com/facebookincubator/create-react-app/issues/1129.
This PR is a prototype implementation for #783 (closed) which hopefully gets the ball rolling.
This is by no means a complete or even polished proposal, but simply a WIP to track the ongoing discussion in #783 (closed) as it unfolds. There is much to be done for DX and message clarity when the Error object is unavailable or unparsable.
Errors
Errors are captured using window.onerror
.
window.onerror
provides the Error
object in most all modern browsers: Chrome 46(?), Firefox 31, IE 11, and Safari 10(ref). Notably, support is missing from Microsoft Edge (unverified, see here -- can someone test this please?).
Unhandled Rejections
Unfortunately, there seems to be no standard/proper way to capture unhandled rejection -- Chrome seems to be the only browser doing this, exposed via the unhandledrejection
event.
Does anyone have any ideas on how to accomplish this / should it be a Chrome only feature?