Rename Errors
to GlobalErrors
for clarity
This commit is contained in:
parent
2575196617
commit
3dffdc3f0b
2 changed files with 4 additions and 4 deletions
17
js/modules/global_errors.js
Normal file
17
js/modules/global_errors.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
const addUnhandledErrorHandler = require('electron-unhandled');
|
||||
|
||||
const Errors = require('./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