peterreilly    2004/06/10 02:12:47

  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.8  +12 -8     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.7
  retrieving revision 1.50.2.8
  diff -u -r1.50.2.7 -r1.50.2.8
  --- Task.java 10 Jun 2004 08:24:20 -0000      1.50.2.7
  +++ Task.java 10 Jun 2004 09:12:46 -0000      1.50.2.8
  @@ -362,15 +362,19 @@
               try {
                   maybeConfigure();
                   execute();
  -            } catch (RuntimeException exc) {
  -                if (exc instanceof BuildException) {
  -                    BuildException be = (BuildException) exc;
  -                    if (be.getLocation() == Location.UNKNOWN_LOCATION) {
  -                        be.setLocation(getLocation());
  -                    }
  +            } catch (BuildException ex) {
  +                if (ex.getLocation() == Location.UNKNOWN_LOCATION) {
  +                    ex.setLocation(getLocation());
                   }
  -                reason = exc;
  -                throw exc;
  +                reason = ex;
  +            } catch (Exception ex) {
  +                reason = ex;
  +                BuildException be = new BuildException(ex);
  +                be.setLocation(getLocation());
  +                throw be;
  +            } catch (Error ex) {
  +                reason = ex;
  +                throw ex;
               } finally {
                   getProject().fireTaskFinished(this, reason);
               }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to