1.1 --- a/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/Bck2BrwsrCase.java Sat Dec 29 19:42:47 2012 +0100
1.2 +++ b/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/Bck2BrwsrCase.java Mon Jan 07 18:27:01 2013 +0100
1.3 @@ -20,6 +20,7 @@
1.4 import java.io.File;
1.5 import java.io.FileWriter;
1.6 import java.io.IOException;
1.7 +import java.lang.reflect.InvocationTargetException;
1.8 import java.lang.reflect.Method;
1.9 import java.util.Map;
1.10 import java.util.WeakHashMap;
1.11 @@ -52,7 +53,12 @@
1.12 MethodInvocation c = l.invokeMethod(m.getDeclaringClass(), m.getName());
1.13 value = c.toString();
1.14 } else {
1.15 - value = m.invoke(m.getDeclaringClass().newInstance());
1.16 + try {
1.17 + value = m.invoke(m.getDeclaringClass().newInstance());
1.18 + } catch (InvocationTargetException ex) {
1.19 + Throwable t = ex.getTargetException();
1.20 + value = t.getClass().getName() + ":" + t.getMessage();
1.21 + }
1.22 }
1.23 }
1.24