mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-23 21:55:30 +02:00
⚡ Adds filter key to error handler
This commit is contained in:
parent
15b38cc6ac
commit
ad069bdf30
@ -4,11 +4,13 @@ import { warningMsg } from '@/utils/CoolConsole';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when an error happens
|
* Function called when an error happens
|
||||||
* If you wish to use an error logging service, put code for it here
|
* Will call to function which prints helpful message to console
|
||||||
|
* If error reporting is enabled, will also log the message to Sentry
|
||||||
|
* If you wish to use your own error logging service, put code for it here
|
||||||
*/
|
*/
|
||||||
const ErrorHandler = function handler(msg) {
|
const ErrorHandler = function handler(msg) {
|
||||||
warningMsg(msg);
|
warningMsg(msg);
|
||||||
Sentry.captureMessage(msg);
|
Sentry.captureMessage(`[USER-WARN] ${msg || 'Uncaptured Message'}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ErrorHandler;
|
export default ErrorHandler;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user