Use window.log in browser context, turn on console eslint rule
This commit is contained in:
16
app/global_errors.js
Normal file
16
app/global_errors.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const addUnhandledErrorHandler = require('electron-unhandled');
|
||||
|
||||
const Errors = require('../js/modules/types/errors');
|
||||
|
||||
// addHandler :: Unit -> Unit
|
||||
exports.addHandler = () => {
|
||||
addUnhandledErrorHandler({
|
||||
logger: error => {
|
||||
console.error(
|
||||
'Uncaught error or unhandled promise rejection:',
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
},
|
||||
showDialog: false,
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user