handle exceptions

This commit is contained in:
Milan Burda
2018-09-09 23:49:55 +02:00
parent a2e13df536
commit 396b179948

View File

@@ -4,7 +4,11 @@ const errorUtils = require('../common/error-utils')
module.exports = () => {
// Call webFrame method
ipcRenderer.on('ELECTRON_INTERNAL_RENDERER_WEB_FRAME_METHOD', (event, method, args) => {
webFrame[method](...args)
try {
webFrame[method](...args)
} catch (error) {
console.error(`${error}`)
}
})
ipcRenderer.on('ELECTRON_INTERNAL_RENDERER_ASYNC_WEB_FRAME_METHOD', (event, requestId, method, args) => {