mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 15:25:51 +01:00
better logging and notifications on script errors for easier debugging
This commit is contained in:
@@ -14,6 +14,12 @@ function showMessage(message) {
|
||||
});
|
||||
}
|
||||
|
||||
function showAndLogError(message, delay = 10000) {
|
||||
showError(message, delay);
|
||||
|
||||
messagingService.logError(message);
|
||||
}
|
||||
|
||||
function showError(message, delay = 10000) {
|
||||
console.log(utils.now(), "error: ", message);
|
||||
|
||||
@@ -36,5 +42,6 @@ function throwError(message) {
|
||||
export default {
|
||||
showMessage,
|
||||
showError,
|
||||
showAndLogError,
|
||||
throwError
|
||||
}
|
||||
Reference in New Issue
Block a user