ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant Target.java
Date Mon, 18 Sep 2000 15:38:39 GMT
bodewig     00/09/18 08:38:38

  Modified:    src/main/org/apache/tools/ant Target.java
  Log:
  Only set location in BuildException if the task didn't provide it
  before.
  
  This will give the correct location for errors in build files invoked
  via the <ant> task.
  
  Revision  Changes    Path
  1.12      +4 -1      jakarta-ant/src/main/org/apache/tools/ant/Target.java
  
  Index: Target.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Target.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Target.java	2000/09/18 14:04:53	1.11
  +++ Target.java	2000/09/18 15:38:38	1.12
  @@ -144,7 +144,10 @@
   		}
                   catch(RuntimeException exc) {
                       if (exc instanceof BuildException) {
  -                        ((BuildException)exc).setLocation(task.getLocation());
  +                        BuildException be = (BuildException) exc;
  +                        if (be.getLocation() == Location.UNKNOWN_LOCATION) {
  +                            be.setLocation(task.getLocation());
  +                        }
                       }
                       project.fireTaskFinished(task, exc);
                       throw exc;
  
  
  

Mime
View raw message