Skip to content

Commit e6f03da

Browse files
committed
muffle invalid webcontents error
1 parent ba9d963 commit e6f03da

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,11 @@ app.on('ready', function() {
188188
else{
189189
const pathToServe = path.resolve(Mounts[host],p);
190190
return net.fetch(pathToFileURL(pathToServe).toString());}});});
191+
192+
//process.removeAllListeners("uncaughtExceptions");
193+
process.on("uncaughtException", (err) => {
194+
if(err.message === "Invalid webContents. Created window should be connected to webContents passed with options object.")
195+
return;
196+
dialog.showMessageBoxSync({type: "error",
197+
title: "Error in Electron main process",
198+
message: err.stack});})

0 commit comments

Comments
 (0)