incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r617471 - /incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingMainServlet.java
Date Fri, 01 Feb 2008 11:04:31 GMT
Author: bdelacretaz
Date: Fri Feb  1 03:04:16 2008
New Revision: 617471

URL: http://svn.apache.org/viewvc?rev=617471&view=rev
Log:
sendError(): Avoid NPE if no Throwable

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=617471&r1=617470&r2=617471&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 03:04:16 2008
@@ -447,7 +447,13 @@
             pw.println("<html><head><title>");
             pw.println(message);
             pw.println("</title></head><body><h1>");
-            pw.println(throwable.toString());
+            if(throwable != null) {
+                pw.println(throwable.toString());
+            } else if(message != null) {
+                pw.println(message);
+            } else {
+                pw.println("Internal error (no Exception to report)");
+            }
             pw.println("</h1><p>");
             pw.println("RequestURI=" + request.getRequestURI());
             if (servletName != null) {



Mime
View raw message