You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2014/04/25 09:11:37 UTC

svn commit: r1589946 - /sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java

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);
             }
 
         }