mirror of https://github.com/electron/electron
14 lines
288 B
JavaScript
14 lines
288 B
JavaScript
const { app } = require('electron');
|
|
|
|
const handleUnhandledRejection = (reason) => {
|
|
console.error(`Unhandled Rejection: ${reason.stack}`);
|
|
app.quit();
|
|
};
|
|
|
|
const main = async () => {
|
|
process.on('unhandledRejection', handleUnhandledRejection);
|
|
throw new Error('oops');
|
|
};
|
|
|
|
main();
|