Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 1177 invoked from network); 25 Oct 2010 00:14:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Oct 2010 00:14:53 -0000 Received: (qmail 41965 invoked by uid 500); 25 Oct 2010 00:14:53 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 41908 invoked by uid 500); 25 Oct 2010 00:14:53 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 41899 invoked by uid 99); 25 Oct 2010 00:14:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Oct 2010 00:14:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Oct 2010 00:14:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 74BEB23888DD; Mon, 25 Oct 2010 00:13:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1026920 - /tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java Date: Mon, 25 Oct 2010 00:13:56 -0000 To: dev@tomcat.apache.org From: kkolinko@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101025001356.74BEB23888DD@eris.apache.org> Author: kkolinko Date: Mon Oct 25 00:13:56 2010 New Revision: 1026920 URL: http://svn.apache.org/viewvc?rev=1026920&view=rev Log: Improve exception handling in PersistentManagerBase. Modified: tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java Modified: tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java?rev=1026920&r1=1026919&r2=1026920&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java Mon Oct 25 00:13:56 2010 @@ -412,15 +412,14 @@ public abstract class PersistentManagerB AccessController.doPrivileged(new PrivilegedStoreClear()); }catch(PrivilegedActionException ex){ Exception exception = ex.getException(); - log.error("Exception clearing the Store: " + exception); - exception.printStackTrace(); + log.error("Exception clearing the Store: " + exception, + exception); } } else { store.clear(); } } catch (IOException e) { - log.error("Exception clearing the Store: " + e); - e.printStackTrace(); + log.error("Exception clearing the Store: " + e, e); } } @@ -609,15 +608,13 @@ public abstract class PersistentManagerB }catch(PrivilegedActionException ex){ Exception exception = ex.getException(); log.error("Exception in the Store during removeSession: " - + exception); - exception.printStackTrace(); + + exception, exception); } } else { store.remove(id); } } catch (IOException e) { - log.error("Exception removing session " + e.getMessage()); - e.printStackTrace(); + log.error("Exception removing session " + e.getMessage(), e); } } @@ -797,9 +794,11 @@ public abstract class PersistentManagerB AccessController.doPrivileged(new PrivilegedStoreSave(session)); }catch(PrivilegedActionException ex){ Exception exception = ex.getException(); + if (exception instanceof IOException) { + throw (IOException) exception; + } log.error("Exception in the Store during writeSession: " - + exception); - exception.printStackTrace(); + + exception, exception); } } else { store.save(session); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org