This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Improve stack trace output a little


Hi,

We would only use the exception class name, but it is better to use the
whole exception, including the message.

2006-11-26  Mark Wielaard  <mark@klomp.org>

        * RunnerProcess.java (getStackTraceString): Use whole exception
        message, not just the class name.

Committed,

Mark

diff -u -r1.15 RunnerProcess.java
--- RunnerProcess.java  13 Oct 2006 11:45:42 -0000      1.15
+++ RunnerProcess.java  26 Nov 2006 23:09:10 -0000
@@ -395,7 +395,7 @@
   private static String getStackTraceString(Throwable ex, String pad)
   {
     StackTraceElement[] st = ex.getStackTrace();
-    StringBuffer sb = new StringBuffer(pad + ex.getClass().getName() + "\n");
+    StringBuffer sb = new StringBuffer(pad + ex.toString() + "\n");
     for (int i = 0; i < st.length; i++)
       sb.append(pad + "at " + st[i].toString() + "\n");
     sb.setLength(sb.length() - 1);

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]