You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unhandled errors in reject throw errors in a setTimeout making catching them impossible. It would be nice to NOT use setTimeout if exports.errorTimeout == 0.
When the error is thrown, it should be wrapped in an Error() if not already instanceof Error so a stack trace can be had.
Currently, there is no way to catch a forgotten call to reject with a dontThrow parameter. The exception is caught in an unhandled exception handler but that kills my app (as it should).
Also, it would be nice if this behavior was documented.
The text was updated successfully, but these errors were encountered:
After looking at a failed attempt to override the reject() function in my code since I don't have access to "handled" variable, I realize that the best solution for this would be to simply wrap the error in Error().
But this should be done OUTSIDE of the setTimeout function so we can capture the stack frame of the reject call that's not handled.
Sorry for so many comments, but I just realized that if you wrap the error in UnhandledRejectError then I can have a unhandled exception handler NOT exit the app when this type of Error is thrown. If you simply wrap it in an Error() then I cannot "know" that it's a recoverable unhandled exception.
Currently, there is no way to catch a forgotten call to reject with a dontThrow parameter. The exception is caught in an unhandled exception handler but that kills my app (as it should).
Also, it would be nice if this behavior was documented.
The text was updated successfully, but these errors were encountered: