Skip to content

Commit

Permalink
exit process on unhandled rejection. natcap#1092.
Browse files Browse the repository at this point in the history
  • Loading branch information
davemfish committed Oct 17, 2022
1 parent cd632e3 commit 1aa404b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions workbench/src/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ process.on('uncaughtException', (err) => {
logger.error(err);
process.exit(1);
});
process.on('unhandledRejection', (reason, promise) => {
process.on('unhandledRejection', (err, promise) => {
logger.error(`unhandled rejection at promise: ${promise}`);
logger.error(reason);
logger.error(err);
process.exit(1);
});

if (!process.env.PORT) {
Expand Down

0 comments on commit 1aa404b

Please sign in to comment.