Comment

Comment by jannes

The author seems to be a bit confused about the difference between "throwing" and "rejecting".

> Promise.allSettled can never throw

Of course not. And Promise.all neither. Promises don't throw, they reject.

async/await is syntactic sugar on top of that, which can make it look similar to throwing, but you will never actually "throw".

parent jannes 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton