electron-connect
electron-connect copied to clipboard
Handling popup exceptions
I have recently filed an issue, within the realm of the Electron project — a case which refers to a condition where Electron raises an exception, alongside with a JavaScript window popup. Such window, specifically in Linux, becomes separated from the main app process; therefore, a CTRL+C issued command, for example, will properly kill the main app but not the separated process associated with the exception (An Electron spawned process is kept alive in Linux.)
The issue is ( screenshots and testcase included ) https://github.com/electron/electron/issues/7530
Within that project, I yet believe it's an interesting case to look at, because IMHO Electron should not start creating popups by default. Plus, in Mac, at least the main process kills the spawned JS error window.
Nevertheless, I believe that such condition is even more critical for a project like electron-connect, as we assume that such project is positioned as an effective means to launch/start/restar/stop operations. I wonder if such control could be integrated in electron-connect side as opposite to asking the developer to create an exception handler within their Browser side app.
Here is how I end up handling, adding exception handling code, to the "third-party" browser client code, simply aimed at taking care of unknown popups that could be displayed https://github.com/taboca/electron-monitor/commit/717e8e017384dbdb62769365fa888e86314369ed
This article may also be a related field https://shapeshed.com/uncaught-exceptions-in-node