-
-
Notifications
You must be signed in to change notification settings - Fork 5
Silencing errors global
Default silencing errors, as it is stated in it's article, silences only issues which are directly related with UNITADE's code. But sometimes, errors, which do not obstruct UX/UI in any way (except spam in console), occur not in the bandwidth of the UNITADE's codebase - for example, Monaco Editor's error of module URL, which happened in issue #119
In checks of error event in the application's window and checks on message, if message
of an exception is in given signatures array, it would be silenced (by preventDefault()
callback). There is one default signatures which are ignored (codebase may differ):
export const DEFAULT_SIGNATURES: string[] = [
"ResizeObserver loop completed with undelivered notifications.",
];While ResizeObserver error is fixable, it requires changes to the core functionality
for code editor module (this observer works for "right-click" events for fenced code).
It shows that you "can" optimize observer's workflow, but doesn't mean any error
in particular.
If you got any external errors (like connections, spamming entities and etc.), you can silence them in "obscure way", because this is NOT good if you need to do it, consider these procedures as "cursed" and as "cancer-feature".
-
Open
data.jsonand edit field:"advanced_silencing_errors": { "signatures": "" }
-
Enter messages of your errors, not stacktrace and not full signature (ignore "Uncaught error" and etc.), split different messages with
\nsymbol, your input must look like this:"ResizeObserver loop completed with undelivered notifications.\nUnknown type of require2 void" -
Close and save updated
data.jsonand open Obsidian again (do not close it); -
Do not touch settings of plugin and any possible data of it: open developer console (
Ctrl+Shift+Ion Windows) and copy+paste this code:await this.app.plugins.plugins.unitade.loadData();