Recent JDKs have a nice feature whereby they print the name of the
thread alongside the stack trace for an uncaught exception. This patch
implements the same for gcj/classpath. I'm checking it in.

regards

  [ bryce ]


2000-10-24  Bryce McKinlay  <[EMAIL PROTECTED]>

        * java/lang/ThreadGroup.java (uncaughtException): Print thread name
        with stack dump.

Index: ThreadGroup.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/ThreadGroup.java,v
retrieving revision 1.10
diff -u -r1.10 ThreadGroup.java
--- ThreadGroup.java    2000/09/13 06:36:25     1.10
+++ ThreadGroup.java    2000/10/24 10:54:23
@@ -500,6 +500,8 @@
       parent.uncaughtException (thread, t);
     else if (! (t instanceof ThreadDeath))
       {
+        if (thread != null)
+          System.out.print("Exception in thread \"" + thread.getName() + "\" ");
        t.printStackTrace();
        had_uncaught_exception = true;
       }

Reply via email to