You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by fm...@apache.org on 2008/02/01 09:35:50 UTC
svn commit: r617370 -
/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingMainServlet.java
Author: fmeschbe
Date: Fri Feb 1 00:35:43 2008
New Revision: 617370
URL: http://svn.apache.org/viewvc?rev=617370&view=rev
Log:
Log exceptions caught and handled in the SlingMainServlet.service mthod
Modified:
incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingMainServlet.java
Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingMainServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingMainServlet.java?rev=617370&r1=617369&r2=617370&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingMainServlet.java (original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingMainServlet.java Fri Feb 1 00:35:43 2008
@@ -264,6 +264,8 @@
} catch (ResourceNotFoundException rnfe) {
// send this exception as a 404 status
+ log.info("service: Resource {} not found", rnfe.getResource());
+
getErrorHandler().handleError(HttpServletResponse.SC_NOT_FOUND,
rnfe.getMessage(), request, response);
@@ -280,11 +282,15 @@
// send this exception as is (albeit unwrapping and wrapped
// exception.
Throwable t = (se.getCause() != null) ? se.getCause() : se;
+ log.error("service: Uncaught SlingException", t);
getErrorHandler().handleError(t, request, response);
} catch (AccessControlException ace) {
// try to request authentication fail, if not possible
+ log.info(
+ "service: Authenticated user {} does not have enough rights to executed requested action",
+ request.getRemoteUser());
getSlingAuthenticator().requestAuthentication(request, response);
} catch (Throwable t) {
@@ -297,6 +303,7 @@
requestData.getActiveServletName());
}
+ log.error("service: Uncaught Throwable", t);
getErrorHandler().handleError(t, request, response);
} finally {