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
asyncfunctionbigProbs(){try{doSomething(function(err){if(err)throwerr;// won't be caught by the parent// ...})}catch(e){throw(e);}}
If so, can you not warn when the try catch is throwing to the parent?
No, your example is equivalent.
I think the intent is to avoid confusion by preventing what could admittedly even be synchronous callbacks (whose errors could actually work here). But it avoids confusion for cases where it really is asynchronous and then the error won't be caught.
Putting callback code inside of async functions like this can lead to a lot of trouble:
The text was updated successfully, but these errors were encountered: