2018-03-06 17:05:53 +00:00
|
|
|
const addUnhandledErrorHandler = require('electron-unhandled');
|
|
|
|
|
2018-07-21 19:00:08 +00:00
|
|
|
const Errors = require('../js/modules/types/errors');
|
2018-03-06 17:05:53 +00:00
|
|
|
|
2018-03-06 17:10:35 +00:00
|
|
|
// addHandler :: Unit -> Unit
|
|
|
|
exports.addHandler = () => {
|
2018-03-06 17:05:53 +00:00
|
|
|
addUnhandledErrorHandler({
|
2018-04-27 21:25:04 +00:00
|
|
|
logger: error => {
|
2018-03-06 17:05:53 +00:00
|
|
|
console.error(
|
|
|
|
'Uncaught error or unhandled promise rejection:',
|
|
|
|
Errors.toLogFormat(error)
|
|
|
|
);
|
|
|
|
},
|
|
|
|
showDialog: false,
|
|
|
|
});
|
|
|
|
};
|