Skip to content

Commit

Permalink
moved promise rejection handler to bin implementation
Browse files Browse the repository at this point in the history
so module-users receive the error and can (silently) handle it
  • Loading branch information
Bartvds committed Jan 13, 2014
1 parent 57f469f commit df31bae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 4 additions & 1 deletion bin/cleaver
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ if (!program.args.length) {
} else {
var file = program.args[0];
var cleaver = new Cleaver(file);
cleaver.run();
cleaver.run()
.fail(function (err) {
console.log('!!', err.message);
});
}

5 changes: 1 addition & 4 deletions lib/cleaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,7 @@ Cleaver.prototype.run = function () {
var assetChain = this.loadStaticAssets();

return Q.all([documentChain, assetChain])
.then(self.renderSlideshow.bind(self))
.fail(function (err) {
console.log('!!', err.message);
});
.then(self.renderSlideshow.bind(self));
};


Expand Down

0 comments on commit df31bae

Please sign in to comment.