Skip to content

Latest commit

 

History

History
64 lines (34 loc) · 1.46 KB

readme.md

File metadata and controls

64 lines (34 loc) · 1.46 KB

electron-unhandled Build Status

Catch unhandled errors and promise rejections in your Electron app

You can use this module directly in both the main and renderer process.

Install

$ npm install electron-unhandled

Usage

const unhandled = require('electron-unhandled');

unhandled();

API

unhandled([options])

You probably want to call this both in the main process and any renderer processes to catch all possible errors.

options

Type: Object

logger

Type: Function
Default: console.error

Custom logger that receives the error.

Can be useful if you for example integrate with Sentry.

showDialog

Type: boolean
Default: true

Present an error dialog to the user.

Related

License

MIT © Sindre Sorhus