ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Ant.java
Date Sun, 22 May 2005 19:48:25 GMT
jkf         2005/05/22 12:48:25

  Modified:    src/main/org/apache/tools/ant/taskdefs Ant.java
  Log:
  Avoiding Throwable while BuildException was actually meant
  
  Revision  Changes    Path
  1.120     +5 -7      ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -u -r1.119 -r1.120
  --- Ant.java	7 Apr 2005 19:31:39 -0000	1.119
  +++ Ant.java	22 May 2005 19:48:25 -0000	1.120
  @@ -31,13 +31,11 @@
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.BuildListener;
   import org.apache.tools.ant.DefaultLogger;
  -import org.apache.tools.ant.Executor;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.ProjectComponent;
   import org.apache.tools.ant.ProjectHelper;
   import org.apache.tools.ant.Target;
   import org.apache.tools.ant.Task;
  -import org.apache.tools.ant.helper.SingleCheckExecutor;
   import org.apache.tools.ant.types.PropertySet;
   import org.apache.tools.ant.util.FileUtils;
   
  @@ -389,18 +387,18 @@
   
               if (locals.size() > 0 && !(locals.size() == 1 
                                          && locals.get(0) == "")) {
  -                Throwable t = null;
  +                BuildException be = null;
                   try {
                       log("Entering " + antFile + "...", Project.MSG_VERBOSE);
                       newProject.fireSubBuildStarted();
                       newProject.executeTargets(locals);
                   } catch (BuildException ex) {
  -                    t = ProjectHelper
  +                    be = ProjectHelper
                           .addLocationToBuildException(ex, getLocation());
  -                    throw (BuildException) t;
  +                    throw be;
                   } finally {
                       log("Exiting " + antFile + ".", Project.MSG_VERBOSE);
  -                    newProject.fireSubBuildFinished(t);
  +                    newProject.fireSubBuildFinished(be);
                   }
               }
           } finally {
  @@ -593,7 +591,7 @@
       /**
        * The build file to use. Defaults to "build.xml". This file is expected
        * to be a filename relative to the dir attribute given.
  -     * @param s the <code>String</code> build file name.
  +     * @param antFile the <code>String</code> build file name.
        */
       public void setAntfile(String antFile) {
           // @note: it is a string and not a file to handle relative/absolute
  
  
  

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


Mime
View raw message