ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/helper ProjectHelperImpl.java
Date Tue, 09 Apr 2002 14:43:30 GMT
bodewig     02/04/09 07:43:30

  Modified:    src/main/org/apache/tools/ant/helper ProjectHelperImpl.java
  Log:
  improve Ant's error message if encoding decl of build file is invalid.
  
  PR: 7825
  
  Revision  Changes    Path
  1.3       +6 -1      jakarta-ant/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java
  
  Index: ProjectHelperImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProjectHelperImpl.java	11 Mar 2002 13:01:48 -0000	1.2
  +++ ProjectHelperImpl.java	9 Apr 2002 14:43:30 -0000	1.3
  @@ -58,6 +58,7 @@
   import java.io.FileInputStream;
   import java.io.FileNotFoundException;
   import java.io.IOException;
  +import java.io.UnsupportedEncodingException;
   import java.util.Locale;
   import org.xml.sax.Locator;
   import org.xml.sax.InputSource;
  @@ -187,8 +188,12 @@
               throw new BuildException(exc.getMessage(), t);
           } catch (FileNotFoundException exc) {
               throw new BuildException(exc);
  +        } catch (UnsupportedEncodingException exc) {
  +            throw new BuildException("Encoding of project file is invalid.", 
  +                                     exc);
           } catch (IOException exc) {
  -            throw new BuildException("Error reading project file", exc);
  +            throw new BuildException("Error reading project file: "
  +                                     +exc.getMessage(), exc);
           } finally {
               if (inputStream != null) {
                   try {
  
  
  

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


Mime
View raw message