huber 2002/11/27 15:58:10 Modified: src/java/org/apache/cocoon/serialization TextSerializer.java XMLSerializer.java . changes.xml Log: Fix setOutputStream throwing IOExeption in XMLSerializer, and TextSerializer. Revision Changes Path 1.8 +8 -6 xml-cocoon2/src/java/org/apache/cocoon/serialization/TextSerializer.java Index: TextSerializer.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/serialization/TextSerializer.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- TextSerializer.java 21 Nov 2002 18:18:49 -0000 1.7 +++ TextSerializer.java 27 Nov 2002 23:58:10 -0000 1.8 @@ -50,13 +50,15 @@ */ package org.apache.cocoon.serialization; -import org.apache.avalon.framework.CascadingRuntimeException; - import javax.xml.transform.OutputKeys; import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamResult; +import org.apache.cocoon.CascadingIOException; + +import java.io.IOException; import java.io.OutputStream; + /** * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a> * @version CVS $Id$ @@ -69,7 +71,7 @@ public TextSerializer() { } - public void setOutputStream(OutputStream out) { + public void setOutputStream(OutputStream out) throws IOException { try { super.setOutputStream(out); handler = this.getTransformerHandler(); @@ -79,8 +81,8 @@ this.setContentHandler(handler); this.setLexicalHandler(handler); } catch (Exception e) { - getLogger().error("TextSerializer.setOutputStream()", e); - throw new CascadingRuntimeException("TextSerializer.setOutputStream()", e); + final String message = "Cannot set TextSerializer outputstream"; + throw new CascadingIOException(message, e); } } 1.8 +7 -6 xml-cocoon2/src/java/org/apache/cocoon/serialization/XMLSerializer.java Index: XMLSerializer.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/serialization/XMLSerializer.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- XMLSerializer.java 21 Nov 2002 18:18:49 -0000 1.7 +++ XMLSerializer.java 27 Nov 2002 23:58:10 -0000 1.8 @@ -50,11 +50,12 @@ */ package org.apache.cocoon.serialization; -import org.apache.avalon.framework.CascadingRuntimeException; - import javax.xml.transform.OutputKeys; import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamResult; +import org.apache.cocoon.CascadingIOException; + +import java.io.IOException; import java.io.OutputStream; /** @@ -69,7 +70,7 @@ public XMLSerializer() { } - public void setOutputStream(OutputStream out) { + public void setOutputStream(OutputStream out) throws IOException { try { super.setOutputStream(out); this.handler = this.getTransformerHandler(); @@ -79,8 +80,8 @@ this.setContentHandler(handler); this.setLexicalHandler(handler); } catch (Exception e) { - getLogger().error("XMLSerializer.setOutputStream()", e); - throw new CascadingRuntimeException("XMLSerializer.setOutputStream()", e); + final String message = "Cannot set XMLSerializer outputstream"; + throw new CascadingIOException(message, e); } } 1.289 +4 -1 xml-cocoon2/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/changes.xml,v retrieving revision 1.288 retrieving revision 1.289 diff -u -r1.288 -r1.289 --- changes.xml 25 Nov 2002 20:15:44 -0000 1.288 +++ changes.xml 27 Nov 2002 23:58:10 -0000 1.289 @@ -40,6 +40,9 @@ </devs> <release version="@version@" date="@date@"> + <action dev="BH" type="fix"> + Fix setOutputStream throwing IOExeption in XMLSerializer, and TextSerializer. + </action> <action dev="NKB" type="fix"> Make the CLI report errors correctly to the screen when a page generation fails. </action>
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]