Use window.log in browser context, turn on console eslint rule
This commit is contained in:
parent
4320b125dd
commit
5933a34a18
71 changed files with 816 additions and 559 deletions
6
app/.eslintrc.js
Normal file
6
app/.eslintrc.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
module.exports = {
|
||||
rules: {
|
||||
// On the node.js side, we're still using console.log
|
||||
'no-console': 'off',
|
||||
},
|
||||
};
|
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,
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue