[FIX] web: display better tracebacks in debug=assets

A previous commit (934e0896160272542dd00) modified QUnit to make sure we
can display better tracebacks in debug=assets mode.  However, this
commit did not apply to errors coming from failing promises.

To fix this, we can simply keep a reference to the error in that
specific case.

closes odoo/odoo#67048

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
Géry Debongnie
2021-03-02 11:00:30 +00:00
parent 4c54cfc52e
commit 3915a3f00e
@@ -3376,6 +3376,7 @@
then.call(promise, function () {
resume();
}, function (error) {
lastError = error;
message = "Promise rejected " + (!phase ? "during" : phase.replace(/Each$/, "")) + " \"" + test.testName + "\": " + (error && error.message || error);
test.pushFailure(message, extractStacktrace(error, 0));