Rethrow exceptions if promise is not yielded
Closed this issue · 0 comments
b-viguier commented
It's very useful to launch an async function, and don't care about it's result/promise. But it can have a tricky side-effect, since exceptions will be stuck in the promise and never be propagated anywhere…
We could ensure that a "non yielded" promise will rethrow all exceptions when rejected.
See similar feature in Amp.
Notes 🤔 :
- What about rejected promises? They shouldn't throw an exception at creation…
- How to explicitly indicates that we don't care about exceptions for a particular promise? Is it easy to try/catch all?