mirror of https://github.com/Lissy93/dashy.git
🚸 Adds user-facing warning logging
This commit is contained in:
parent
0927ea879b
commit
6e0cda8709
|
@ -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;',
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue