Skip to content

Commit

Permalink
Merge pull request #71 from selvagsz/patch_show_error_message_along_w…
Browse files Browse the repository at this point in the history
…ith_filename

Shows error message on failures
  • Loading branch information
Ilya Radchenko committed Aug 5, 2015
2 parents 7e54791 + 2cd2842 commit d376a87
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 d376a87

Please sign in to comment.