Skip to content

Commit

Permalink
Caught unhandled exceptions in promises (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
babich-a committed Apr 15, 2019
1 parent 8faba59 commit 9dc65f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ const devextremeConfig = require('./utility/devextreme-config');
const printHelp = require('./commands/help').printHelp;
const packageJson = require('./package.json');

process.on('unhandledRejection', (error) => {
console.log(error);
process.exit(1);
});

if(!commands.length) {
if(args.version) {
console.log(packageJson.version);
Expand Down

0 comments on commit 9dc65f8

Please sign in to comment.