Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Add unhandled exception notices for Deferred #2736
Right now, if there is an exception in a
One possible tradeoff would be to only generate the console warnings for errors that seem to be programming mistakes such as
For more complex cases we could recommend that people use native Promise if it's consistently available across their supported platforms, since it will be easier to debug.
Unhandled rejections may be handled later so going through
If this went through a property and not events, we'd need to remove stuff from there once it's handled so we'd have to be careful about perf.
seems like a good tradeoff to me. But maybe we could do more.
Also, it's worth noting what Node.js did to make working with rejections easier: https://nodejs.org/api/process.html#process_event_unhandledrejection
I don't have time to address this today, but we can talk about it at the next meeting. I'm opposed to the core library having an opinion, and still maintain that it's a plugin problem for now. I'm happy to write it... have we documented current best practices?
Ref jquerygh-2736 The exception stack has the name of the immediately outer function where the exception occurred, which can be very handy for tracing errors. Since we already have the exception object we might as well use it.
Ref gh-2736 The exception stack has the name of the immediately outer function where the exception occurred, which can be very handy for tracing errors. Since we already have the exception object we might as well use it.