Catch unhandled errors and promise rejections in your Electron app
by sindresorhusJavaScript
Last 12 weeks · 0 commits
4 of 6 standards met
I want to restart the page or program after capturing a crash in the rendering process or main process. or
Since Node v22 recently added the ability to import ESM packages from CJS as long as they do not have top-level await, I've been mostly unblocked to upgrade to pure-ESM packages now with the latest release of Electron this month. Since this package uses top-level await, I'm not currently able to use it as is without patching or transpiling it, or going back to the old version. For the sake of users like me using , is it possible to remove the top level await without behavior breakage?
Error message: So basically the problem here is that node APIs are not polyfilled any more. I guess recommended way to fix this, would be to extract part which is intended for rendrer, to something like and do not import what is not needed. Would you accept PR on such change? This is super breaking change.
Repository: sindresorhus/electron-unhandled. Description: Catch unhandled errors and promise rejections in your Electron app Stars: 466, Forks: 27. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Topics: electron, electron-module. Latest release: v5.0.0 (2y ago). Open PRs: 0, open issues: 9. Last activity: 2y ago. Community health: 71%. Top contributors: sindresorhus, BendingBender, erdkse, jmerle, Armaldio, raphinesse, Richienb, TechQuery.