ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant Task.java
Date Thu, 10 Jun 2004 08:24:20 GMT
peterreilly    2004/06/10 01:24:20

  Modified:    src/main/org/apache/tools/ant Tag: ANT_16_BRANCH Task.java
  Log:
  sync
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.50.2.7  +5 -3      ant/src/main/org/apache/tools/ant/Task.java
  
  Index: Task.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Task.java,v
  retrieving revision 1.50.2.6
  retrieving revision 1.50.2.7
  diff -u -r1.50.2.6 -r1.50.2.7
  --- Task.java	9 Mar 2004 17:01:30 -0000	1.50.2.6
  +++ Task.java	10 Jun 2004 08:24:20 -0000	1.50.2.7
  @@ -357,11 +357,11 @@
        */
       public final void perform() {
           if (!invalid) {
  +            getProject().fireTaskStarted(this);
  +            Throwable reason = null;
               try {
  -                getProject().fireTaskStarted(this);
                   maybeConfigure();
                   execute();
  -                getProject().fireTaskFinished(this, null);
               } catch (RuntimeException exc) {
                   if (exc instanceof BuildException) {
                       BuildException be = (BuildException) exc;
  @@ -369,8 +369,10 @@
                           be.setLocation(getLocation());
                       }
                   }
  -                getProject().fireTaskFinished(this, exc);
  +                reason = exc;
                   throw exc;
  +            } finally {
  +                getProject().fireTaskFinished(this, reason);
               }
           } else {
               UnknownElement ue = getReplacement();
  
  
  

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


Mime
View raw message