mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-21 04:35:15 +02:00
⚡ Update error handler, for non-critical warnings
This commit is contained in:
parent
e216de0e63
commit
affff262d3
@ -1,5 +1,5 @@
|
|||||||
import * as Sentry from '@sentry/vue';
|
import * as Sentry from '@sentry/vue';
|
||||||
import { warningMsg } from '@/utils/CoolConsole';
|
import { warningMsg, statusMsg } from '@/utils/CoolConsole';
|
||||||
import { sessionStorageKeys } from '@/utils/defaults';
|
import { sessionStorageKeys } from '@/utils/defaults';
|
||||||
|
|
||||||
/* Makes the current time, like hh:mm:ss */
|
/* Makes the current time, like hh:mm:ss */
|
||||||
@ -28,4 +28,9 @@ const ErrorHandler = function handler(msg) {
|
|||||||
Sentry.captureMessage(`[USER-WARN] ${msg}`); // Report to bug tracker (if enabled)
|
Sentry.captureMessage(`[USER-WARN] ${msg}`); // Report to bug tracker (if enabled)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Similar to error handler, but for recording general info */
|
||||||
|
export const InfoHandler = (msg, title) => {
|
||||||
|
statusMsg(title || 'Info', msg);
|
||||||
|
};
|
||||||
|
|
||||||
export default ErrorHandler;
|
export default ErrorHandler;
|
||||||
|
@ -103,6 +103,7 @@ module.exports = {
|
|||||||
/* Key names for session storage identifiers */
|
/* Key names for session storage identifiers */
|
||||||
sessionStorageKeys: {
|
sessionStorageKeys: {
|
||||||
SW_STATUS: 'serviceWorkerStatus',
|
SW_STATUS: 'serviceWorkerStatus',
|
||||||
|
ERROR_LOG: 'errorLog',
|
||||||
},
|
},
|
||||||
/* Unique IDs of modals within the app */
|
/* Unique IDs of modals within the app */
|
||||||
modalNames: {
|
modalNames: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user