Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.5, 5.13.0
-
36be27265d61c76b25417a25e482030e30ff380f (qt/qtdeclarative/5.13)
Description
I'm facing a bug in Qt's Promise implementation. Exceptions thrown from the second argument of Promise.prototype.then()'s argument aren't propagated to the following .catch() statement.
I have a simple test case:
Promise.reject("Some error") .then( o => console.log("Never reached"), err => { console.log("Rethrowing err"); throw err; } ) .catch(err => { console.error("The error is: " + err); });
This is what it should print:
Rethrowing err The error is: Some error
and it does so under Node.js and Mozilla Firefox.
However, it only prints the first line under Qt, because the .catch() part isn't run at all.