You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2004/09/22 22:18:21 UTC

svn commit: rev 47070 - cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet

Author: vgritsenko
Date: Wed Sep 22 13:18:21 2004
New Revision: 47070

Modified:
   cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/CocoonServlet.java
Log:
getMessage -> toString so that something shows up if exception has null message


Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/CocoonServlet.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/CocoonServlet.java	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/CocoonServlet.java	Wed Sep 22 13:18:21 2004
@@ -1147,17 +1147,17 @@
 
             } catch (ConnectionResetException e) {
                 if (getLogger().isDebugEnabled()) {
-                    getLogger().debug(e.getMessage(), e);
+                    getLogger().debug(e.toString(), e);
                 } else if (getLogger().isWarnEnabled()) {
-                    getLogger().warn(e.getMessage());
+                    getLogger().warn(e.toString());
                 }
 
             } catch (IOException e) {
                 // Tomcat5 wraps SocketException into ClientAbortException which extends IOException.
                 if (getLogger().isDebugEnabled()) {
-                    getLogger().debug(e.getMessage(), e);
+                    getLogger().debug(e.toString(), e);
                 } else if (getLogger().isWarnEnabled()) {
-                    getLogger().warn(e.getMessage());
+                    getLogger().warn(e.toString());
                 }
 
             } catch (Exception e) {
@@ -1220,13 +1220,13 @@
                 } else if (getLogger().isWarnEnabled()) {
                     getLogger().warn("SocketException while trying to close stream.");
                 }
-            // See: http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107489037219505&w=2
-            } catch (IOException ie) {
+            } catch (IOException e) {
+                // See: http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107489037219505
                 if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Cocoon got an IOException while trying to close stream.", ie);
+                    getLogger().debug("IOException while trying to close stream.", e);
                 }
             } catch (Exception e) {
-                getLogger().error("Cocoon got an Exception while trying to close stream.", e);
+                getLogger().error("Exception while trying to close stream.", e);
             }
         }
     }