mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
If a theme/plugin raises an error while decorating post content, the decorator will be skipped, and the error reported on the console. Additionally, administrators will be shown a red warning at the top of the screen. This commit refactors and re-uses some of the logic from the theme-initializer-error-reporting logic. In future, new error reports can be added by doing something like: ``` document.dispatchEvent( new CustomEvent("discourse-error", { detail: { messageKey: "some.translation.key", error }, }) ); ```