<control : fail>


Exits the active build, giving an additional message if available. The if and unless attributes make the failure conditional -both probe for the named property being defined. The if tests for the property being defined, the unless for a property being undefined. If both attributes are set, then the test fails only if both tests are true. i.e.
fail := defined(ifProperty) && !defined(unlessProperty)
A single nested<condition> element can be specified instead of using if/unless (a combined effect can be achieved using isset conditions).


Attribute Description Type Required?
status Set the status code to associate with the thrown Exception. int ?
message A message giving further information on why the build exited. String ?
unless Only fail if a property of the given name does not exist in the current project. String ?
if Only fail if a property of the given name exists in the current project. String ?

Parameters accepted as nested elements

This Task accepts text in its element body.

<condition> (Of type ConditionBase )

Baseclass for the <condition> task as well as several conditions - ensures that the types of conditions inside the task and the "container" conditions are in sync.
Attribute Description Type Required