mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
163366997c
Previously, when wrapping errors in wrapError, if the error was not an actual error object, we wouldn't set the cause property on the wrapping error correctly. The "instanceof Error" check is simply there so that we can know whether we can add the original errors message to the wrapping error, but the line that sets the error's cause was mistakenly moved into that condition. This commit also fixes the wrapping error's message in the case of non-Error objects, to avoid having "the following error occurred in hookname:" with nothing after the colon which is confusing/misleading.