Simplify code since ServletException now uses standard exception chaining.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 28 Jan 2007 15:28:23 +0000 (15:28 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 28 Jan 2007 15:28:23 +0000 (15:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@500812 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/StandardWrapper.java
java/org/apache/catalina/valves/ErrorReportValve.java

index 9dc8d4b..c090a62 100644 (file)
@@ -709,9 +709,7 @@ public class StandardWrapper
             return theException;
         }
         
-        if (theRootCause instanceof ServletException) {
-            deeperRootCause = ((ServletException) theRootCause).getRootCause();
-        } else if (jspExceptionClazz!=null &&
+        if (jspExceptionClazz!=null &&
                 jspExceptionClazz.isAssignableFrom(theRootCause.getClass())) {
             deeperRootCause = (Throwable)IntrospectionUtils.getProperty(
                     theRootCause, "rootCause"); 
index 1a2d622..479cba3 100644 (file)
@@ -241,10 +241,7 @@ public class ErrorReportValve
                 sb.append("</pre></p>");
                 // In case root cause is somehow heavily nested
                 try {
-                    if (rootCause instanceof ServletException) {
-                        nestedRootCause =
-                            ((ServletException) rootCause).getRootCause();
-                    } else if (jspExceptionClazz!=null &&
+                    if (jspExceptionClazz!=null &&
                             jspExceptionClazz.isAssignableFrom(
                                     rootCause.getClass())) {
                         nestedRootCause = (Throwable)IntrospectionUtils.