Skip to content
E

Electron Unhandled

Catch unhandled errors and promise rejections in your Electron app

by sindresorhusFree

#3613in Utilities
0In stores

Description

electron-unhandled catches unhandled errors and promise rejections in an Electron app, so they are reported instead of failing silently. You…

Highlights

  • Catches unhandled errors and promise rejections
  • Works in the main process and renderer processes
  • Reports crashed or unresponsive renderers
  • Shows a dialog with the error message
  • Requires Electron 44 or later

Ratings & Reviews

No ratings yet

Be the first to rate Electron Unhandled.

People also visit

D

Desktop App

One app to rule them all!

Utilities
Launch
P

Packager

Customize and package your Electron app with OS-specific bundles

Utilities
Launch
E

electron

Build cross-platform desktop applications

AI Skills
Get
E

electron-trpc

Build type-safe Electron inter-process communication using tRPC

Utilities
Launch
D

desktop

Electron desktop development guide

AI Skills
Get
E

Electron Toolkit

Toolkit for Electron

Utilities
Launch

Electron Unhandled FAQ

What does electron-unhandled do?

It catches unhandled errors and promise rejections in an Electron app, and shows them in a dialog.

Which Electron version does it need?

Electron 44 or later, according to the README.

Do I call it in the main process?

Yes, at minimum. The README also suggests calling it in each window's code so renderer errors are caught.

Why don't I see page errors from my preload script?

With contextIsolation on, which is the Electron default, a preload script does not receive errors from the page. The README suggests setting contextIsolation to false, or catching the errors in the page.

Does the error include a stack trace?

No. The README says the reported error has no stack trace of your app, so the dialog shows the message only.

What are the best Electron Unhandled alternatives?

Popular alternatives to Electron Unhandled include Desktop App, Packager and electron-trpc. See all Electron Unhandled alternatives

Developer Stuff

Badges