W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2018

throw vs promise reject

From: Guru Partap Khalsa <horus.scope@gmail.com>
Date: Mon, 17 Sep 2018 03:44:43 -0700
Message-ID: <CALjRnZd7TxhqBa-Xian9tMMSMRtVaghYdQ7iq=Li+m3Vt4pP+w@mail.gmail.com>
To: public-webapps@w3.org
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.

Thank you for any insight
Received on Monday, 17 September 2018 21:35:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:15:15 UTC