Skip to content

Instantly share code, notes, and snippets.

@NickHeiner
Created February 19, 2015 19:12
Show Gist options
  • Save NickHeiner/161b84ebbdb31a0b7f05 to your computer and use it in GitHub Desktop.
Save NickHeiner/161b84ebbdb31a0b7f05 to your computer and use it in GitHub Desktop.
grunt error checking
grunt.registerTask('my-task', function() {
var util = require('util'),
done = this.async();
doAsyncWork().then(done).fail(function(err) {
done(util.isError(err) ? err : new Error(err));
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment