From 3915a3f00e75b7fbde31f77ca4835bc8a9673cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Tue, 2 Mar 2021 11:00:30 +0000 Subject: [PATCH] [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) --- addons/web/static/lib/qunit/qunit-2.9.1.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/lib/qunit/qunit-2.9.1.js b/addons/web/static/lib/qunit/qunit-2.9.1.js index 9724e74e0b9..ddbdcee3e75 100644 --- a/addons/web/static/lib/qunit/qunit-2.9.1.js +++ b/addons/web/static/lib/qunit/qunit-2.9.1.js @@ -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));