ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: Validating task attributes
Date Fri, 02 Jun 2000 07:35:31 GMT
>>>>> "CC" == Craig Cottingham <ccottingham@euronetservices.com> writes:

 CC> When is the appropriate time to validate the values of the
 CC> attributes for a task: when the attribute is set (I assume this
 CC> happens at parse time), or when the attribute would be used (for
 CC> instance, in execute())?

First, yes you are right, attributes are set at parse time right now.

If you want to throw a BuildException on malformed attributes execute
is your only clean choice - as the setters shouldn't throw any
Exceptions at all. If you just want to print a warning you can do it
in the setter method.

In some cases execute is your only choice anyway - when two attributes
depend on each other for example.

Stefan

Mime
View raw message