Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (21 sloc) 1.448 kb

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.

Jump to Line
Something went wrong with that request. Please try again.