- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 20 Sep 2018 11:45:25 -0700
- To: horus.scope@gmail.com
- Cc: public-webapps <public-webapps@w3.org>
On Mon, Sep 17, 2018 at 2:38 PM Guru Partap Khalsa <horus.scope@gmail.com> wrote: > What is the reasoning for XMLHttpRequest to "throw" rather than rejecting a promise? It almost seems sarcastic to ask why a stack trace is helpful when the network times out. Tangential to what Boris just said, note that all promises rejected by the platform get rejected with an Error, so you still get a stack trace either way. ^_^ (And this is the generally correct practice, as `await` turns a rejection into a thrown error.) ~TJ
Received on Thursday, 20 September 2018 18:46:00 UTC