svn commit: r1416384 - /cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/util/URLConnectionUtils.java

[email protected]
Newsgroups gmane.text.xml.cocoon.cvs
Message-ID <[email protected]>
Author: ilgrosso
Date: Mon Dec  3 09:26:29 2012
New Revision: 1416384

URL: http://svn.apache.org/viewvc?rev=1416384&view=rev
Log:
Safer exception handling

Modified:
    cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/util/URLConnectionUtils.java

Modified: cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/util/URLConnectionUtils.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/util/URLConnectionUtils.java?rev=1416384&r1=1416383&r2=1416384&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/util/URLConnectionUtils.java (original)
+++ cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/util/URLConnectionUtils.java Mon Dec  3 09:26:29 2012
@@ -50,7 +50,7 @@ public final class URLConnectionUtils {
             InputStream inputStream = null;
             try {
                 inputStream = urlConnection.getInputStream();
-            } catch (IOException e) {
+            } catch (Exception e) {
                 LOG.warn("Can't close input stream from " + urlConnection.getURL(), e);
             } finally {
                 close(urlConnection, inputStream);
@@ -61,7 +61,7 @@ public final class URLConnectionUtils {
             OutputStream outputStream = null;
             try {
                 outputStream = urlConnection.getOutputStream();
-            } catch (IOException e) {
+            } catch (Exception e) {
                 LOG.warn("Can't close output stream to " + urlConnection.getURL(), e);
             } finally {
                 close(urlConnection, outputStream);
@@ -73,7 +73,7 @@ public final class URLConnectionUtils {
         if (closeable != null) {
             try {
                 closeable.close();
-            } catch (IOException e) {
+            } catch (Exception e) {
                 LOG.warn("Can't close stream (" + closeable.getClass().getSimpleName() + "): "
                         + urlConnection.getURL(), e);
             }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.