tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r496373 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
Date Mon, 15 Jan 2007 15:41:37 GMT
Author: remm
Date: Mon Jan 15 07:41:36 2007
New Revision: 496373

URL: http://svn.apache.org/viewvc?view=rev&rev=496373
Log:
- Simplify the code.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?view=diff&rev=496373&r1=496372&r2=496373
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java Mon Jan 15
07:41:36 2007
@@ -163,15 +163,6 @@
         if ((statusCode < 400) || (response.getContentCount() > 0))
             return;
 
-        Throwable rootCause = null;
-
-        if (throwable != null) {
-
-            if (throwable instanceof ServletException)
-                rootCause = ((ServletException) throwable).getRootCause();
-
-        }
-
         String message = RequestUtil.filter(response.getMessage());
         if (message == null)
             message = "";
@@ -227,6 +218,7 @@
             sb.append("</pre></p>");
 
             int loops = 0;
+            Throwable rootCause = throwable.getCause();
             while (rootCause != null && (loops < 10)) {
                 stackTrace = getPartialServletStackTrace(rootCause);
                 sb.append("<p><b>");



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message