Closed Taitava closed 3 years ago
Create a helper function for this in Common.ts ShellCommandsPlugin
:
newError(message: string) {
let timeout_value = *retrieve from settings*;
new Notice(message, timeout_value);
}
This way all places that throw errors will use a common helper function, and it's possible to later change the appearance of error messages to something else than a Notice
, if ever needed.
Released.
If a command fails, the error message stays just a few seconds on screen. Maybe create a setting for how long to display any notice messages (= errors)?
Search all occurrences of:
... and add a timeout parameter: