🥅 Catch error, if clipboard not enabled (#681)

This commit is contained in:
Alicia Sykes
2022-05-31 18:48:24 +01:00
committed by Alicia Sykes
parent 972e3f7571
commit ac97be20be
3 changed files with 28 additions and 14 deletions

View File

@@ -22,13 +22,10 @@ const appendToErrorLog = (msg) => {
* 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, errorStack) {
// Print to console
warningMsg(msg, errorStack);
// Save to local storage
appendToErrorLog(msg);
// Report to bug tracker (if enabled)
Sentry.captureMessage(`[USER-WARN] ${msg}`);
export const ErrorHandler = function handler(msg, errorStack) {
warningMsg(msg, errorStack); // Print to console
appendToErrorLog(msg); // Save to local storage
Sentry.captureMessage(`[USER-WARN] ${msg}`); // Report to bug tracker (if enabled)
};
/* Similar to error handler, but for recording general info */