Return-Path: Delivered-To: apmail-incubator-sling-commits-archive@locus.apache.org Received: (qmail 14961 invoked from network); 1 Feb 2008 08:36:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Feb 2008 08:36:20 -0000 Received: (qmail 96942 invoked by uid 500); 1 Feb 2008 08:36:12 -0000 Delivered-To: apmail-incubator-sling-commits-archive@incubator.apache.org Received: (qmail 96903 invoked by uid 500); 1 Feb 2008 08:36:12 -0000 Mailing-List: contact sling-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: sling-dev@incubator.apache.org Delivered-To: mailing list sling-commits@incubator.apache.org Received: (qmail 96894 invoked by uid 99); 1 Feb 2008 08:36:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2008 00:36:12 -0800 X-ASF-Spam-Status: No, hits=-98.0 required=10.0 tests=ALL_TRUSTED,URIBL_BLACK X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2008 08:36:05 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3D3BD1A9832; Fri, 1 Feb 2008 00:35:57 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r617370 - /incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingMainServlet.java Date: Fri, 01 Feb 2008 08:35:50 -0000 To: sling-commits@incubator.apache.org From: fmeschbe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080201083557.3D3BD1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 {