Files
Signal-Desktop/js/modules/errors.js
2018-03-08 16:22:38 -05:00

18 lines
400 B
JavaScript

const addUnhandledErrorHandler = require('electron-unhandled');
const Errors = require('./types/errors');
// addGlobalHandler :: Unit -> Unit
exports.addGlobalHandler = () => {
addUnhandledErrorHandler({
logger: (error) => {
console.error(
'Uncaught error or unhandled promise rejection:',
Errors.toLogFormat(error)
);
},
showDialog: false,
});
};