cziegeler 2004/03/20 09:02:46
Modified: src/blocks/portal/java/org/apache/cocoon/portal/transformation ProxyTransformer.java Log: Removed prints to system out/err. THanks for spotting this! Revision Changes Path 1.10 +12 -17 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/ProxyTransformer.java Index: ProxyTransformer.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/ProxyTransformer.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ProxyTransformer.java 20 Mar 2004 16:33:42 -0000 1.9 +++ ProxyTransformer.java 20 Mar 2004 17:02:46 -0000 1.10 @@ -230,13 +230,12 @@ /** * Processes the request to the external application */ - protected void processRequest() { + protected void processRequest() throws SAXException { try { String remoteURI = null; try { remoteURI = resolveURI(link, documentBase); - } - catch (MalformedURLException ex) { + } catch (MalformedURLException ex) { throw new SAXException(ex); } @@ -285,8 +284,7 @@ } while (remoteURI != null); - } - catch (IOException ex) { + } catch (IOException ex) { throw new SAXException( "Failed to retrieve remoteURI " + remoteURI, ex); @@ -297,11 +295,10 @@ DOMStreamer streamer = new DOMStreamer(); streamer.setContentHandler(contentHandler); streamer.stream(result.getDocumentElement()); - } - catch (Exception ex) { - System.err.println("Unexpected Exception occured: " + ex); - ex.printStackTrace(); - throw new RuntimeException(ex.toString()); + } catch (SAXException se) { + throw se; + } catch (Exception ex) { + throw new SAXException(ex); } } @@ -420,7 +417,8 @@ * @param connection hte HttpURLConnection to read from * @return the result as valid W3C DOM XHTML document */ - protected Document readXML(HttpURLConnection connection) { + protected Document readXML(HttpURLConnection connection) + throws SAXException { try { int charEncoding = configuredEncoding; @@ -459,11 +457,8 @@ errorWriter.flush(); errorWriter.close(); return doc; - } - catch (Exception ex) { - System.err.println("unexpected exeption: " + ex); - ex.printStackTrace(); - throw new RuntimeException(ex.toString()); + } catch (Exception ex) { + throw new SAXException(ex); } }