Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 72148 invoked from network); 20 Mar 2004 17:02:49 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 20 Mar 2004 17:02:49 -0000 Received: (qmail 98823 invoked by uid 500); 20 Mar 2004 17:02:41 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 98767 invoked by uid 500); 20 Mar 2004 17:02:40 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 98755 invoked by uid 500); 20 Mar 2004 17:02:40 -0000 Delivered-To: apmail-cocoon-2.1-cvs@apache.org Received: (qmail 98751 invoked from network); 20 Mar 2004 17:02:40 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 20 Mar 2004 17:02:40 -0000 Received: (qmail 72107 invoked by uid 1260); 20 Mar 2004 17:02:46 -0000 Date: 20 Mar 2004 17:02:46 -0000 Message-ID: <20040320170246.72105.qmail@minotaur.apache.org> From: cziegeler@apache.org To: cocoon-2.1-cvs@apache.org Subject: cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation ProxyTransformer.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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); } }