incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1589946 - /sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
Date Fri, 25 Apr 2014 07:11:37 GMT
Author: cziegeler
Date: Fri Apr 25 07:11:37 2014
New Revision: 1589946

URL: http://svn.apache.org/r1589946
Log:
SLING-3517 : SlingPostServlet catches all throwables and logs them at debug level

Modified:
    sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java

Modified: sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java?rev=1589946&r1=1589945&r2=1589946&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
(original)
+++ sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
Fri Apr 25 07:11:37 2014
@@ -42,7 +42,6 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.SlingHttpServletResponse;
-import org.apache.sling.api.request.RequestProgressTracker;
 import org.apache.sling.api.resource.ResourceNotFoundException;
 import org.apache.sling.api.resource.ResourceUtil;
 import org.apache.sling.api.servlets.SlingAllMethodsServlet;
@@ -201,11 +200,11 @@ public class SlingPostServlet extends Sl
             } catch (ResourceNotFoundException rnfe) {
                 htmlResponse.setStatus(HttpServletResponse.SC_NOT_FOUND,
                     rnfe.getMessage());
-            } catch (Throwable throwable) {
-                log.debug("Exception while handling POST "
+            } catch (final Exception exception) {
+                log.warn("Exception while handling POST "
                     + request.getResource().getPath() + " with "
-                    + operation.getClass().getName(), throwable);
-                htmlResponse.setError(throwable);
+                    + operation.getClass().getName(), exception);
+                htmlResponse.setError(exception);
             }
 
         }



Mime
View raw message