You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by da...@apache.org on 2006/11/02 22:26:30 UTC

svn commit: r470529 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/reading/ResourceReader.java

Author: danielf
Date: Thu Nov  2 13:26:29 2006
New Revision: 470529

URL: http://svn.apache.org/viewvc?view=rev&rev=470529
Log:
Remove swallowing of IOExceptions from the ResourceReader as it makes debuging of e.g. block protocol usage very hard. It seem like the situation is handled in the AbstractPipelineProcessor and the RequestProcessor anyway. See http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116250218603497&w=2 for a discussion.

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/reading/ResourceReader.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/reading/ResourceReader.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/reading/ResourceReader.java?view=diff&rev=470529&r1=470528&r2=470529
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/reading/ResourceReader.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/reading/ResourceReader.java Thu Nov  2 13:26:29 2006
@@ -321,32 +321,30 @@
     /**
      * Generates the requested resource.
      */
-    public void generate()
-    throws IOException, ProcessingException {
+    public void generate() throws IOException, ProcessingException {
+        InputStream inputStream;
         try {
-            InputStream inputStream;
-            try {
-                inputStream = inputSource.getInputStream();
-            } catch (SourceException e) {
-                throw SourceUtil.handle("Error during resolving of the input stream", e);
-            }
+            inputStream = inputSource.getInputStream();
+        } catch (SourceException e) {
+            throw SourceUtil.handle(
+                    "Error during resolving of the input stream", e);
+        }
 
-            // Bugzilla Bug #25069: Close inputStream in finally block.
-            try {
-                processStream(inputStream);
-            } finally {
-                if (inputStream != null) {
-                    inputStream.close();
-                }
+        // Bugzilla Bug #25069: Close inputStream in finally block.
+        try {
+            processStream(inputStream);
+        } finally {
+            if (inputStream != null) {
+                inputStream.close();
             }
+        }
 
-            if (!quickTest) {
-                // if everything is ok, add this to the list of generated documents
-                // (see http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=102921894301915 )
-                documents.put(request.getRequestURI(), inputSource.getURI());
-            }
-        } catch (IOException e) {
-            getLogger().debug("Received an IOException, assuming client severed connection on purpose");
+        if (!quickTest) {
+            // if everything is ok, add this to the list of generated documents
+            // (see
+            // http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=102921894301915
+            // )
+            documents.put(request.getRequestURI(), inputSource.getURI());
         }
     }