diff --git a/src/utils/CoolConsole.js b/src/utils/CoolConsole.js index 09efcd17..2871d0a5 100644 --- a/src/utils/CoolConsole.js +++ b/src/utils/CoolConsole.js @@ -28,7 +28,7 @@ export const statusMsg = (title, msg) => { /* Prints status message, with a stack trace */ export const statusErrorMsg = (title, msg, errorLog) => { console.log( - `%c${title || ''}\n%c${msg} \n%c${errorLog}`, + `%c${title || ''}\n%c${msg} \n%c${errorLog || ''}`, 'font-weight: bold; color: #0dd8d8; text-decoration: underline;', 'color: #ff025a', 'color: #ff025a80;', diff --git a/src/utils/ErrorHandler.js b/src/utils/ErrorHandler.js index d0c96f08..1d253281 100644 --- a/src/utils/ErrorHandler.js +++ b/src/utils/ErrorHandler.js @@ -1,5 +1,5 @@ import * as Sentry from '@sentry/vue'; -import { warningMsg, statusMsg } from '@/utils/CoolConsole'; +import { warningMsg, statusMsg, statusErrorMsg } from '@/utils/CoolConsole'; import { sessionStorageKeys } from '@/utils/defaults'; /* Makes the current time, like hh:mm:ss */ @@ -33,4 +33,9 @@ export const InfoHandler = (msg, title) => { statusMsg(title || 'Info', msg); }; +/* Outputs warnings caused by the user, such as missing field */ +export const WarningInfoHandler = (msg, title, log) => { + statusErrorMsg(title || 'Warning', msg, log); +}; + export default ErrorHandler;