Skip to content

Commit

Permalink
Shows error message on failures
Browse files Browse the repository at this point in the history
  • Loading branch information
selvaganesh.b committed Aug 5, 2015
1 parent 7e54791 commit 2cd2842
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/watson.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ function transform(files, transformFormula) {

fs.writeFileSync(file, newSource);
}
} catch (err) {
wontFix.push(file);
} catch (error) {
wontFix.push({
name: file,
error: error.message
});
}
}, this);

Expand All @@ -85,7 +88,7 @@ function transform(files, transformFormula) {
);

wontFix.forEach(function(file) {
console.log(chalk.red(file));
console.log(chalk.red(file.name + ' - ' + file.error));
});

console.log(chalk.red('\nA possible cause is having all the source code commented.'));
Expand Down

0 comments on commit 2cd2842

Please sign in to comment.