Skip to content

Commit

Permalink
Merge pull request #25 from sbrandwoo/fail-on-error
Browse files Browse the repository at this point in the history
Throw a proper error when something goes wrong.
  • Loading branch information
ericclemmons committed Apr 2, 2014
2 parents 61a426b + 8d7e7c3 commit 3591c02
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tasks/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ module.exports = function(grunt) {
compiled.push(transform(grunt.file.read(file), options));
next();
} catch (e) {
var error = grunt.log.wordlist(['[react] ' + e], { color: 'red' });
grunt.log.error(error);
nextFileObj(error);
grunt.fail.warn(e);
}
}, function () {
grunt.file.write(destFile, compiled.join(grunt.util.normalizelf(grunt.util.linefeed)));
Expand Down

0 comments on commit 3591c02

Please sign in to comment.