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:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* (Apache Software Foundation, Exoffice Technologies)
* @author <a href="mailto:[EMAIL PROTECTED]">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: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]