On 24/04/2011, at 8:47 AM, Jared D. Cottrell wrote:

> How do I fail a script early other than with System.exit(1)?  I'm
> doing some validation of the environment and configuration and would
> like to provide feedback early rather than letting the script run only
> to fail toward the end with a cryptic message.

You can just throw an exception. You can do this in the body of the script, or 
in a task action, or pretty much where-ever you like.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to