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/taskdefs Copydir.java
Date Fri, 23 Jun 2000 14:17:18 GMT
bodewig     00/06/23 07:17:17

  Modified:    src/main/org/apache/tools/ant/taskdefs Copydir.java
  Log:
  Improved error messages if srcdir doesn't exist.
  
  Submitted by: Peter Nordlund <peter.nordlund@lentus.se>
  
  Revision  Changes    Path
  1.7       +5 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copydir.java
  
  Index: Copydir.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copydir.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Copydir.java	2000/02/14 12:19:27	1.6
  +++ Copydir.java	2000/06/23 14:17:17	1.7
  @@ -86,11 +86,13 @@
   
       public void execute() throws BuildException {
           if (srcDir == null) {
  -            throw new BuildException("srcdir attribute must be set!");
  +            throw new BuildException("srcdir attribute must be set!", 
  +                                     location);
           }
   
           if (!srcDir.exists()) {
  -            throw new BuildException("srcdir does not exist!");
  +            throw new BuildException("srcdir "+srcDir.toString()
  +                                     +" does not exist!", location);
           }
   
           DirectoryScanner ds = super.getDirectoryScanner(srcDir);
  @@ -109,7 +111,7 @@
                   } catch (IOException ioe) {
                       String msg = "Failed to copy " + fromFile + " to " + toFile
                           + " due to " + ioe.getMessage();
  -                    throw new BuildException(msg);
  +                    throw new BuildException(msg, ioe, location);
                   }
               }
           }
  
  
  

Mime
View raw message