1.4 KiB
Grunt homepage | Documentation table of contents
The grunt API / grunt.fail
For when something goes horribly wrong.
See the fail lib source for more information.
The fail API
If something explodes (or is about to explode) inside a helper or task, it can force grunt to abort. See the exit codes documentation for a list of all built-in grunt exit codes.
Note that any method marked with a ☃ (unicode snowman) is also available directly on the grunt
object. Just so you know. See the API main page for more usage information.
grunt.warn ☃
Display a warning and abort grunt immediately. Grunt will continue processing tasks if the --force
command-line option was specified. The error
argument can be a string message or an error object.
grunt.warn(error [, errorcode])
If --debug 9
is specified on the command-line and an error object was specified, a stack trace will be logged.
This method is also available as grunt.warn.
grunt.fatal ☃
Display a warning and abort grunt immediately. The error
argument can be a string message or an error object.
grunt.fail(error [, errorcode])
If --debug 9
is specified on the command-line and an error object was specified, a stack trace will be logged.
This method is also available as grunt.fatal.