cziegeler 2003/05/16 04:39:11
Modified:
src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl
XSLTAspect.java
Log:
Correct exception handling
Revision Changes Path
1.2 +9 -2
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java
Index: XSLTAspect.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XSLTAspect.java 7 May 2003 06:22:22 -0000 1.1
+++ XSLTAspect.java 16 May 2003 11:39:11 -0000 1.2
@@ -50,6 +50,8 @@
*/
package org.apache.cocoon.portal.layout.renderer.aspect.impl;
+import java.io.IOException;
+
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.sax.TransformerHandler;
@@ -66,6 +68,7 @@
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceResolver;
import org.apache.excalibur.xml.xslt.XSLTProcessor;
+import org.apache.excalibur.xml.xslt.XSLTProcessorException;
import org.apache.excalibur.xml.xslt.XSLTProcessorImpl;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
@@ -109,7 +112,11 @@
context.invokeNext(layout, service, transformer);
transformer.endDocument();
- } catch (Exception ce) {
+ } catch (XSLTProcessorException xpe) {
+ throw new SAXException("XSLT Exception.", xpe);
+ } catch (IOException io) {
+ throw new SAXException("Error in resolving.", io);
+ } catch (ComponentException ce) {
throw new SAXException("Unable to lookup component.", ce);
} finally {
if (null != resolver) {