Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The solution to catch the errors for each function would be to catch errors from each promise individually (possibly within their functions, or within wrapper functions). This solution would also clearly state the intent. Performing concurrent tasks and only catching the errors at a higher level is a tricky thing to define behavior against; .Net/C# does it with the `AggregateException`, but even that comes with its own difficulties (which error comes from which promise? which came first? did one cause the other?).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: