better logging and notifications on script errors for easier debugging

This commit is contained in:
azivner
2018-08-17 11:31:42 +02:00
parent 513748836e
commit 145efe67c3
5 changed files with 40 additions and 11 deletions

View File

@@ -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
}