Closed romanseidl closed 5 years ago
Judging from the docs, I'm not entirely sure this gives us exactly what we want since it seems like it only applies to the main frame?
I thought that this actually aims specifically at the main frame. The old source had an explicit check:
if (resourceType === "mainFrame") {
app.exit(1);
}
This should now be obsolete, thus I removed the check. I tested it and it gives me an error if the page gives e.g. 404, which is important to me as I want to automatically generate pdfs from web pages and track those with errors.
If we want to target also a sub frame and then only issue a console.error maybe one would have to hook on other events such as 'did-frame-navigate'?
@romanseidl To be honest, the subframes are not crucial, but it was added for extra debugging. We do want to exit if the mainframe fails to load, but it would be nice to know what parts of the page failed to load.
For the system to react on errors on electron 3.
s. https://github.com/electron/electron/issues/12597