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 2013/10/08 12:00:48 UTC
svn commit: r1530205 -
/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingRequestProcessorImpl.java
Author: cziegeler
Date: Tue Oct 8 10:00:48 2013
New Revision: 1530205
URL: http://svn.apache.org/r1530205
Log:
SLING-3150 : Error handler does not get original exception
Modified:
sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingRequestProcessorImpl.java
Modified: sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingRequestProcessorImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingRequestProcessorImpl.java?rev=1530205&r1=1530204&r2=1530205&view=diff
==============================================================================
--- sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingRequestProcessorImpl.java (original)
+++ sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingRequestProcessorImpl.java Tue Oct 8 10:00:48 2013
@@ -167,7 +167,7 @@ public class SlingRequestProcessorImpl i
handleError(HttpServletResponse.SC_NOT_FOUND, rnfe.getMessage(),
request, response);
- } catch (SlingException se) {
+ } catch (final SlingException se) {
// if we have request data and a non-null active servlet name
// we assume, that this is the name of the causing servlet
@@ -178,7 +178,10 @@ public class SlingRequestProcessorImpl i
// send this exception as is (albeit unwrapping and wrapped
// exception.
- Throwable t = (se.getCause() != null) ? se.getCause() : se;
+ Throwable t = se;
+ while ( t instanceof SlingException && t.getCause() != null ) {
+ t = t.getCause();
+ }
log.error("service: Uncaught SlingException", t);
handleError(t, request, response);