<fail/>will exit the current build with no further information given.
BUILD FAILED build.xml:4: No message <fail message="Something wrong here."/>will exit the current build and print something like the following to wherever your output goes:
BUILD FAILED build.xml:4: Something wrong here. <fail>Something wrong here.</fail>will give the same result as above.