giacomo     01/06/08 12:52:59

  Modified:    src/org/apache/cocoon/generation FileGenerator.java
  Log:
  Added patch to differentiate from FileNotFound and other exceptions
  Submitted by: Vadim Gritsenko <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.10      +6 -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.10
  diff -u -u -r1.9 -r1.10
  --- FileGenerator.java        2001/05/31 17:38:19     1.9
  +++ FileGenerator.java        2001/06/08 19:52:58     1.10
  @@ -38,7 +38,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:[EMAIL PROTECTED]";>Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.9 $ $Date: 2001/05/31 17:38:19 $
  + * @version CVS $Revision: 1.10 $ $Date: 2001/06/08 19:52:58 $
    */
   public class FileGenerator extends ComposerGenerator
   implements Cacheable, Recyclable {
  @@ -113,9 +113,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:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to