signal-desktop/app/global_errors.js

17 lines
397 B
JavaScript
Raw Normal View History

const addUnhandledErrorHandler = require('electron-unhandled');
const Errors = require('../js/modules/types/errors');
// addHandler :: Unit -> Unit
exports.addHandler = () => {
addUnhandledErrorHandler({
2018-04-27 21:25:04 +00:00
logger: error => {
console.error(
'Uncaught error or unhandled promise rejection:',
Errors.toLogFormat(error)
);
},
showDialog: false,
});
};