gruntjs/grunt — pull request #1017 by Termina1 (2013-12-23 11:00:34+00:00)
Title: Trigger events on fatal and warn

Sometimes when task spawns other tasks, we need to have an ability to react somehow to their failure.
So, I simply trigger event ```warn``` on warn failure and ```fatal``` on fatal faliure.
For example,
```js
grunt.event.on('warn', function() {
fs.unlink(util.buildFolder());
grunt.log.writeln('ERROR -- build folder removed');
});
```