incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1544544 - /sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java
Date Fri, 22 Nov 2013 14:11:15 GMT
Author: bdelacretaz
Date: Fri Nov 22 14:11:14 2013
New Revision: 1544544

URL: http://svn.apache.org/r1544544
Log:
SLING-3255 - this piece of special exception handling is actually useful

Modified:
    sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java

Modified: sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java?rev=1544544&r1=1544543&r2=1544544&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java
(original)
+++ sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java
Fri Nov 22 14:11:14 2013
@@ -482,7 +482,11 @@ public class StreamRendererServlet exten
                 ostream.println();
 
                 // Copy content
-                copy(istream, ostream, currentRange);
+                try {
+                    copy(istream, ostream, currentRange);
+                } catch(IOException e) {
+                    exception = e;
+                }
             } finally {
                 closeSilently(istream);
             }
@@ -491,6 +495,10 @@ public class StreamRendererServlet exten
 
         ostream.println();
         ostream.print("--" + mimeSeparation + "--");
+        
+        if(exception != null) {
+            throw exception;
+        }
     }
 
     /**



Mime
View raw message