cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/generation FileGenerator.java
Date Thu, 06 Sep 2001 10:45:11 GMT
dims        01/09/06 03:45:11

  Modified:    src/org/apache/cocoon/generation Tag: cocoon_20_branch
                        FileGenerator.java
  Log:
  Re-add Patch for better exception handling in FileGenerator. Had got lost in the sync.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.12  +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.9.2.11
  retrieving revision 1.9.2.12
  diff -u -r1.9.2.11 -r1.9.2.12
  --- FileGenerator.java	2001/09/05 22:18:14	1.9.2.11
  +++ FileGenerator.java	2001/09/06 10:45:11	1.9.2.12
  @@ -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.9.2.11 $ $Date: 2001/09/05 22:18:14 $
  + * @version CVS $Revision: 1.9.2.12 $ $Date: 2001/09/06 10:45:11 $
    */
   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


Mime
View raw message