Added some junk test code to make sure the exceptions propagate correctly from JNI to Java.