You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2004/03/03 15:28:23 UTC
DO NOT REPLY [Bug 27219] -
in an macro outputs wrong
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27219>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27219
<fail> in an <imported> macro outputs wrong
------- Additional Comments From peter.reilly@corvil.com 2004-03-03 14:28 -------
There is one case where an attribute to suppress the stack
would be useful. This would be a simple macro that tests a
condition and issues a fail message - the error in not in the
macro itself, but is described completly by the fail message.
For example:
<macrodef name="failifpresent" backtraceonerror="no">
<attribute name="classname"/>
<text name="message"/>
<sequential>
<ac:if>
<ac:available classname="@{classname}"/>
<ac:then>
<fail>@{message}</fail>
</ac:then>
</ac:if>
</sequential>
</macrodef>
<failifpresent classname="net.sf.antextra.util.AntExtraUtil">
AntExtra files are present in your default classpath
please remove...
and try again
</failifpresent>
> What is the behavior when the failure occurs inside <subant> or <antcall>?
> Don't we get the same stack trace as we do for <macro>?
yes, this behaviour has been added since ant 1.6.0
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org