ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: failonerror; general solution
Date Fri, 03 Oct 2003 14:59:44 GMT
> -----Original Message-----
> From: peter reilly [mailto:peter.reilly@corvil.com]
> 
> Here is a task that does some like that:
> 
> package task;
> 
> import org.apache.tools.ant.taskdefs.Sequential;
> 
> 
> public class NoFail extends Sequential {
>     private String failureProperty;
>     public void setFailureProperty(String name) {
>         this.failureProperty = name;
>     }
>     public void execute() {
>         try {
>             super.execute();
>         } catch (Throwable t) {
>             if (failureProperty != null) {
>                 getProject().setNewProperty(
>                     failureProperty, "true");
>             }
>         }
>     }
> }

Why don't you splice that code in Sequential itself Peter ;-) --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message