# Monday, July 22, 2002
« No Title | Main | More java.lang.Throwable »
No Title

I did lots of work on exception handling. Most of it now works (fully compatible with J2SE 1.4). Some highlights:

  • java.lang.Throwable is remapped to System.Exception (for maximum compability with .NET code)
  • Throwable.getMessage(), Throwable.getCause() & Throwable.toString() all work, and are fully compatible with J2SE 1.4. Additionally, the message is stored as the System.Exception.Message property, and when the exception object was constructed with a cause, the System.Exception.InnerException property is set.
  • Stack traces now work (fully Java compatible), except for J2SE 1.4 inner exceptions stack trace dumping.
  • I made the XML remapping language more powerful. It now supports calling helper methods and using locals to twiddle around with method arguments.

Things that don't work:

  • When .NET code prints a stacktrace from an exception thrown by Java code, the stacktrace only shows the stack from the last rethrow point in the Java code.
  • Throwable.printStackTrace() doesn't yet support Caused by: in the stack traces.
  • Additional exception information object (that contains the stacktrace and the cause)  is not yet garbage collected when the exception goes away.

Here is the testcase I used.

Updated the snapshot.

Monday, July 22, 2002 7:32:54 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]
Comments are closed.