[FIX] web: restore error dialogs for erroring js modules

In 64fc704527, we made it so that when an
async module throws an error, we catch the error and log it so that we
can mark the module as being in error. This means the error is now
invisible to the error service.

We do not want to rethrow the error, as this would stop us from loading
the rest of the modules, but we can still allow the error service to see
the error by simply dispatching it as a promise rejection in a separate
async call stack, allowing us to continue loading modules but also
giving the opportunity to the error service to see the error if it is
started.

Closes #92192

closes odoo/odoo#115230

X-original-commit: facc0f0c022df94487ef9518348f039b56c7b536
Signed-off-by: Samuel Degueldre <sad@odoo.com>
This commit is contained in:
Samuel Degueldre
2023-03-17 19:22:05 +01:00
parent c2e85ba46c
commit 38f463af32
+1
View File
@@ -104,6 +104,7 @@
job.error = e;
failed.push(job);
console.error(`Error while loading ${job.name}: ${e.message}`, e);
Promise.reject(e);
}
var def = new Promise(function (resolve) {
try {