cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/generation FileGenerator.java
Date Thu, 07 Jun 2001 21:31:25 GMT
giacomo     01/06/07 14:31:25

  Modified:    src/org/apache/cocoon/generation Tag: cocoon_20_branch
                        FileGenerator.java
  Log:
  Added patch to differentiate from FileNotFound and other exceptions
  Submitted by:	Vadim Gritsenko <vgritsenko@hns.com>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.1   +7 -2      xml-cocoon2/src/org/apache/cocoon/generation/FileGenerator.java
  
  Index: FileGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/generation/FileGenerator.java,v
  retrieving revision 1.9
  retrieving revision 1.9.2.1
  diff -u -u -r1.9 -r1.9.2.1
  --- FileGenerator.java	2001/05/31 17:38:19	1.9
  +++ FileGenerator.java	2001/06/07 21:31:23	1.9.2.1
  @@ -9,6 +9,7 @@
   
   import java.io.File;
   import java.io.IOException;
  +import java.io.FileNotFoundException;
   import java.util.Map;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
  @@ -38,7 +39,7 @@
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.9 $ $Date: 2001/05/31 17:38:19 $
  + * @version CVS $Revision: 1.9.2.1 $ $Date: 2001/06/07 21:31:23 $
    */
   public class FileGenerator extends ComposerGenerator
   implements Cacheable, Recyclable {
  @@ -113,9 +114,13 @@
   
               parser.setConsumer(super.xmlConsumer);
               parser.parse(this.inputSource.getInputSource());
  +        } catch (FileNotFoundException e) {
  +            getLogger().warn("FileGenerator could not find resource" + this.inputSource.getSystemId(),
e);
  +            throw new ResourceNotFoundException("FileGenerator could not find resource
"
  +                + this.inputSource.getSystemId());
           } catch (IOException e) {
               getLogger().error("FileGenerator.generate()", e);
  -            throw new ResourceNotFoundException("FileGenerator could not find resource",
e);
  +            throw new ResourceNotFoundException("FileGenerator could not read resource",
e);
           } catch (SAXException e) {
               getLogger().error("FileGenerator.generate()", e);
               throw(e);
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message