ant/docs/manual/CoreTasks/fail.html
Stefan Bodewig b6a3e9df36 License police on documentation files:
(1) Make sure there is a Copyright notice on all visible files.

(2) Make sure all years in which the file has been modified are
listed.

(3) Make sure the format is consistent, i.e. separate consecutive
years with a dash, not a comma.

When Stephane changed starteam.html it has been 2001 in France but
2002 in Australia - does that mean we add 2002 to the Copyright line
or not?  ;-)


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270652 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 08:48:33 +00:00

68 lines
1.8 KiB
HTML

<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>
<tr>
<td valign="top">if</td>
<td valign="top">Only fail if a property of the given name exists
in the current project</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">unless</td>
<td valign="top">Only fail if a property of the given name doesn't
exist in the current project</td>
<td align="center" valign="top">No</td>
</tr>
</table>
<h3>Examples</h3>
<pre> &lt;fail/&gt;</pre>
<p>will exit the current build with no further information given.</p>
<pre>
BUILD FAILED
build.xml:4: No message
</pre>
<pre> &lt;fail message=&quot;Something wrong here.&quot;/&gt;</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> &lt;fail&gt;Something wrong here.&lt;/fail&gt;</pre>
<p>will give the same result as above.</p>
<hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
Reserved.</p>
</body>
</html>