Improve JniAbort (and JNI tests).
This has been on my to-do list for a while, but it actually bit people
in the ass yesterday. This change enables us to write a lot more (and
better) tests, but for now I've just improved the tests that already
existed.
Change-Id: I04a18656de60b47e5a6b5777204c144209d1448e
diff --git a/src/jni_internal.cc b/src/jni_internal.cc
index 82fba54..ed46837 100644
--- a/src/jni_internal.cc
+++ b/src/jni_internal.cc
@@ -302,7 +302,7 @@
if (error_count > 0) {
// TODO: pass the JNI function name (such as "CallVoidMethodV") through so we can call JniAbort
// with an argument.
- JniAbort(NULL);
+ JniAbortF(NULL, "bad arguments passed to %s (see above for details)", PrettyMethod(m).c_str());
}
}