<html> <head> <meta http-equiv="Content-Language" content="en-us"> <title>Apache Ant User Manual</title> </head> <body> <h2><a name="fail">Fail</a></h2> <h3>Description</h3> <p>Exits the current build (just throwing a BuildException), optionally printing additional information.</p> <p>The message of the Exception can be set via the message attribute or character data nested into the element.</p> <h3>Parameters</h3> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">message</td> <td valign="top">A message giving further information on why the build exited</td> <td align="center" valign="top">No</td> </tr> </table> <h3>Examples</h3> <pre> <fail/></pre> <p>will exit the current build with no further information given.</p> <pre> BUILD FAILED build.xml:4: No message </pre> <pre> <fail message="Something wrong here."/></pre> <p>will exit the current build and print something like the following to wherever your output goes:</p> <pre> BUILD FAILED build.xml:4: Something wrong here. </pre> <pre> <fail>Something wrong here.</fail></pre> <p>will give the same result as above.</p> <hr> <p align="center">Copyright © 2000,2001 Apache Software Foundation. All rights Reserved.</p> </body> </html>