You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by di...@apache.org on 2001/09/06 12:44:56 UTC

cvs commit: xml-cocoon2/src/org/apache/cocoon/generation FileGenerator.java

dims        01/09/06 03:44:56

  Modified:    src/org/apache/cocoon/generation FileGenerator.java
  Log:
  Re-add Patch for better exception handling in FileGenerator. Had got lost in the sync.
  
  Revision  Changes    Path
  1.21      +9 -6      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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- FileGenerator.java	2001/08/25 19:40:32	1.20
  +++ FileGenerator.java	2001/09/06 10:44:56	1.21
  @@ -35,7 +35,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.20 $ $Date: 2001/08/25 19:40:32 $
  + * @version CVS $Revision: 1.21 $ $Date: 2001/09/06 10:44:56 $
    */
   public class FileGenerator extends ComposerGenerator
   implements Cacheable, Recyclable {
  @@ -107,11 +107,14 @@
               getLogger().debug("file resolved to " + this.inputSource.getSystemId());
   
               this.inputSource.toSAX(super.xmlConsumer);
  -        } catch (Exception e) {
  -            getLogger().error("Could not read resource "
  -                              + this.inputSource.getSystemId(), e);
  -            throw new SAXException("Could not read resource "
  -                                   + this.inputSource.getSystemId(), e);
  +        } catch (FileNotFoundException e) {
  +            getLogger().warn("Could not find resource " + this.inputSource.getSystemId(), e);
  +            throw new ResourceNotFoundException("Could not find resource "
  +                + this.inputSource.getSystemId(), e);
  +        } catch (IOException e) {
  +            getLogger().error("Could not read resource " + this.inputSource.getSystemId(), e);
  +            throw new ResourceNotFoundException("Could not read resource "
  +                + this.inputSource.getSystemId(), 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