Today's snapshot contains a very helpful new feature: Line numbers in stack traces. Unfortunately you only get line numbers in statically compiled code on .NET 1.1, but on Whidbey you'll also get line numbers for dynamically compiled code. At the moment Mono doesn't support them at all :-(
Together with this I also fixed up the stack trace cleaning code to remove most of the IKVM and .NET implementation artifacts from the stack traces. If you don't want the sanitized stack traces, you can use -Dikvm.cleanstacktrace=0 to disable it. This can be helpful to understand what's going on under the covers, especially if there is a bug in the cleanup code
-Dikvm.cleanstacktrace=0
Here is an example of a cleaned stack trace with line numbers (when run on Whidbey):
public class test { public static void main(String[] args) { try { Object o = new Object(); ((cli.System.Object)o).ToString(); } catch(Throwable t) { t.printStackTrace(); } try { new java.util.Hashtable().put(null, null); } catch(Throwable t) { t.printStackTrace(); } try { "".endsWith(null); } catch(Throwable t) { t.printStackTrace(); } try { "".charAt(1); } catch(Throwable t) { t.printStackTrace(); } } }
C:\tmp>ikvm test java.lang.ClassCastException at test.main (test.java:7) java.lang.NullPointerException at java.util.Hashtable.hash (Hashtable.java:822) at java.util.Hashtable.put (Hashtable.java:432) at test.main (test.java:12) java.lang.NullPointerException at cli.System.String.EndsWith (Unknown Source) at java.lang.String.endsWith (map.xml:335) at test.main (test.java:17) java.lang.StringIndexOutOfBoundsException at java.lang.String.charAt (map.xml:266) at test.main (test.java:22)
What's new:
New snapshots: just the binaries and source plus binaries.
Powered by: newtelligence dasBlog 2.3.12105.0
© Copyright 2021, Jeroen Frijters
E-mail