This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
FYI: java.awt.Toolkit initialization patchlet
- From: Mark Wielaard <mark at klomp dot org>
- To: java-patches at gcc dot gnu dot org
- Date: 06 Jun 2003 15:10:19 +0200
- Subject: FYI: java.awt.Toolkit initialization patchlet
Hi,
This makes it much easier to see what really went wrong when
initializing the AWT Toolkit.
2003-06-06 Mark Wielaard <mark@klomp.org>
* java/awt/Toolkit.java (getDefaultToolkit): Add exception cause to
AWTError.
Cheers,
Mark
Index: java/awt/Toolkit.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Toolkit.java,v
retrieving revision 1.21
diff -u -r1.21 Toolkit.java
--- java/awt/Toolkit.java 24 Mar 2003 13:50:32 -0000 1.21
+++ java/awt/Toolkit.java 6 Jun 2003 13:09:32 -0000
@@ -496,9 +496,10 @@
toolkit = (Toolkit) obj;
return toolkit;
}
- catch (Exception e)
+ catch (Throwable t)
{
- throw new AWTError("Cannot load AWT toolkit: " + e.getMessage());
+ AWTError e = new AWTError("Cannot load AWT toolkit: " + toolkit_name);
+ throw (AWTError) e.initCause(t);
}
}