db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r169501 - /incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
Date Tue, 10 May 2005 17:38:08 GMT
Author: mikem
Date: Tue May 10 10:38:06 2005
New Revision: 169501

URL: http://svn.apache.org/viewcvs?rev=169501&view=rev
Log:
committing fix for DERBY-237 for ksunithaghm@gmail.com.  

This patch fixes derby-237: Boot errors from store must not lose error messages/stack traces
in between.

Actually nested exceptions from the boot error were not lost but their stack traces were not
being written out into error stream which is why the entire stack traces of exceptions was
not printed out to derby.log


Modified:
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java?rev=169501&r1=169500&r2=169501&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
Tue May 10 10:38:06 2005
@@ -3951,14 +3951,19 @@
 		}
 	}
 
+    /**
+     * print stack trace from the Throwable including
+     * its nested exceptions 
+     * @param t trace starts from this error
+     */
 	private void printErrorStack(Throwable t)
 	{
-		Monitor.logMessage("-------------------------\n");
-		t.printStackTrace(Monitor.getStream().getPrintWriter());
-		Monitor.logMessage("-------------------------\n");
-		ErrorStringBuilder esb = new ErrorStringBuilder(Monitor.getStream().getHeader());
+		ErrorStringBuilder esb = 
+            new ErrorStringBuilder(Monitor.getStream().getHeader());
 		esb.stackTrace(t);
-	}
+        Monitor.logMessage(esb.get().toString());
+        esb.reset();
+    }
 
 
 	/**



Mime
View raw message