cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r161181 - cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ErrorHandlerHelper.java cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java cocoon/trunk/status.xml
Date Wed, 13 Apr 2005 13:44:18 GMT
Author: vgritsenko
Date: Wed Apr 13 06:44:15 2005
New Revision: 161181

URL: http://svn.apache.org/viewcvs?view=rev&rev=161181
Log:
      Stacktrace of the ResourceNotFound exception is logged only in DEBUG level,
      otherwise only exception message is logged.


Modified:
    cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ErrorHandlerHelper.java
    cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java
    cocoon/trunk/status.xml

Modified: cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ErrorHandlerHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ErrorHandlerHelper.java?view=diff&r1=161180&r2=161181
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ErrorHandlerHelper.java
(original)
+++ cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ErrorHandlerHelper.java
Wed Apr 13 06:44:15 2005
@@ -162,7 +162,11 @@
                                                                       Environment env,
                                                                       InvokeContext context)
     throws Exception {
-        this.handledErrorsLogger.error(ex.getMessage(), ex);
+        if (ex instanceof ResourceNotFoundException) {
+            this.handledErrorsLogger.error(ex.getMessage());
+        } else {
+            this.handledErrorsLogger.error(ex.getMessage(), ex);
+        }
 
         try {
             prepare(context, env, ex);

Modified: cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java?view=diff&r1=161180&r2=161181
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java Wed Apr 13 06:44:15
2005
@@ -402,9 +402,11 @@
                                     null);
                     return;
                 }
-            } catch (ResourceNotFoundException rse) {
-                if (getLogger().isWarnEnabled()) {
-                    getLogger().warn("The resource was not found", rse);
+            } catch (ResourceNotFoundException e) {
+                if (getLogger().isDebugEnabled()) {
+                    getLogger().warn(e.getMessage(), e);
+                } else if (getLogger().isWarnEnabled()) {
+                    getLogger().warn(e.getMessage());
                 }
 
                 manageException(request, res, env, uri,
@@ -412,7 +414,7 @@
                                 "Resource Not Found",
                                 "Resource Not Found",
                                 "The requested resource \"" + request.getRequestURI() + "\"
could not be found",
-                                rse);
+                                e);
                 return;
 
             } catch (ConnectionResetException e) {

Modified: cocoon/trunk/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?view=diff&r1=161180&r2=161181
==============================================================================
--- cocoon/trunk/status.xml (original)
+++ cocoon/trunk/status.xml Wed Apr 13 06:44:15 2005
@@ -426,6 +426,10 @@
    </action>
   </release>
   <release version="2.1.8" date="TBD">
+    <action dev="VG" type="update">
+      Stacktrace of the ResourceNotFound exception is logged only in DEBUG level,
+      otherwise only exception message is logged.
+    </action>
     <action dev="SW" type="fix">
       Fix environment handling to allow the root sitemap to be at an abitrary location
       and not only in the main webapp context directory.



Mime
View raw message