Improved error logging

This commit is contained in:
Alicia Sykes
2021-09-04 23:09:21 +01:00
parent 09bc8a32f3
commit a66636bde8
3 changed files with 20 additions and 13 deletions

View File

@@ -1,15 +1,14 @@
/* eslint no-console: ["error", { allow: ["warn", "error"] }] */
import { warningMsg, raiseBug } from '@/utils/CoolConsole';
import * as Sentry from '@sentry/vue';
import { warningMsg } from '@/utils/CoolConsole';
/**
* Function called when an error happens
* If you wish to use an error logging service, put code for it here
*/
const ErrorHandler = function handler(msg) {
warningMsg();
console.warn(msg);
raiseBug();
warningMsg(msg);
Sentry.captureMessage(msg);
};
export default ErrorHandler;