diff --git a/scripts/logging.js b/scripts/logging.js index 833b0fe..691119d 100644 --- a/scripts/logging.js +++ b/scripts/logging.js @@ -72,7 +72,8 @@ export default class logging { */ static async error(ERROR_CODE, ERROR_MESSAGE, ERROR_STACK, critical = true) { // Display the error message. - console.error(texts.localized(`error_msg`, false, [ERROR_CODE, ERROR_MESSAGE, ERROR_STACK])); + console.error('%c%s%c%s%c%s%c\n%s%c', `font-weight: bold;`, ERROR_CODE, ``, `:`, ``, ERROR_MESSAGE, `font-family: monospace;`, ERROR_STACK, ``); + try { (critical) ? alert(texts.localized(`error_msg_GUI`, false, [String(ERROR_CODE), ERROR_MESSAGE])) : M.toast({ text: ERROR_MESSAGE }); } catch(err) {};