Hi,

I just made the following change based on what Bryce McKinlay did in libgcj.

2001-03-19  Mark Wielaard  <[EMAIL PROTECTED]>

    * java/lang/ExceptionInInitializerError.java: print classname for target
    exception
    * java/lang/reflect/InvocationTargetException.java: idem

Cheers,

Mark

-- 
Stuff to read:
    <http://www.toad.com/gnu/whatswrong.html>
  What's Wrong with Copy Protection, by John Gilmore
Index: java/lang/ExceptionInInitializerError.java
===================================================================
RCS file: /cvs/classpath/java/lang/ExceptionInInitializerError.java,v
retrieving revision 1.5
diff -u -r1.5 ExceptionInInitializerError.java
--- java/lang/ExceptionInInitializerError.java  2001/03/11 15:52:38     1.5
+++ java/lang/ExceptionInInitializerError.java  2001/03/19 22:11:26
@@ -77,7 +77,7 @@
    */
   public ExceptionInInitializerError(Throwable t)
     {
-      super();
+      super(t.toString());
       exception = t;
     }
 
@@ -103,6 +103,7 @@
        }
       else
        {
+         System.err.print(this.getClass() + ": ");
          exception.printStackTrace();
        }
     }
@@ -119,6 +120,7 @@
        }
       else
        {
+         ps.print(this.getClass() + ": ");
          exception.printStackTrace(ps);
        }
     }
@@ -135,6 +137,7 @@
        }
       else
        {
+         pw.print(this.getClass() + ": ");
          exception.printStackTrace(pw);
        }
     }
Index: java/lang/reflect/InvocationTargetException.java
===================================================================
RCS file: /cvs/classpath/java/lang/reflect/InvocationTargetException.java,v
retrieving revision 1.5
diff -u -r1.5 InvocationTargetException.java
--- java/lang/reflect/InvocationTargetException.java    2001/03/11 15:52:39     1.5
+++ java/lang/reflect/InvocationTargetException.java    2001/03/19 22:11:26
@@ -66,7 +66,7 @@
    */
   public InvocationTargetException(Throwable targetException) 
     {
-      super();
+      super(targetException.toString());
       target = targetException;
     }
   
@@ -98,7 +98,10 @@
       if (target == null)
        super.printStackTrace();
       else
+      {
+       System.err.print(this.getClass() + ": ");
        target.printStackTrace();
+      }
     }
 
   public void printStackTrace(PrintStream ps)
@@ -106,7 +109,10 @@
       if (target == null)
        super.printStackTrace(ps);
       else
+      {
+       ps.print(this.getClass() + ": ");
        target.printStackTrace(ps);
+      }
     }
 
   public void printStackTrace(PrintWriter pw)
@@ -114,6 +120,9 @@
       if (target == null)
        super.printStackTrace(pw);
       else
+      {
+       pw.print(this.getClass() + ": ");
        target.printStackTrace(pw);
+      }
     }
 }

Reply via email to