android-2.1_r1 snapshot
diff --git a/JNIHelp.c b/JNIHelp.c
index aacecb6..748d8ff 100644
--- a/JNIHelp.c
+++ b/JNIHelp.c
@@ -55,7 +55,15 @@
}
/*
- * Throw a java.IO.IOException, generating the message from errno.
+ * Throw a java.lang.RuntimeException, with an optional message.
+ */
+int jniThrowRuntimeException(JNIEnv* env, const char* msg)
+{
+ return jniThrowException(env, "java/lang/RuntimeException", msg);
+}
+
+/*
+ * Throw a java.io.IOException, generating the message from errno.
*/
int jniThrowIOException(JNIEnv* env, int errnum)
{
@@ -85,4 +93,3 @@
return jniThrowException(env, "java/io/IOException", message);
}
-
diff --git a/include/nativehelper/JNIHelp.h b/include/nativehelper/JNIHelp.h
index 3982797..698cba7 100644
--- a/include/nativehelper/JNIHelp.h
+++ b/include/nativehelper/JNIHelp.h
@@ -53,7 +53,12 @@
int jniThrowException(C_JNIEnv* env, const char* className, const char* msg);
/*
- * Throw a java.IO.IOException, generating the message from errno.
+ * Throw a java.lang.RuntimeException, with an optional message.
+ */
+int jniThrowRuntimeException(JNIEnv* env, const char* msg);
+
+/*
+ * Throw a java.io.IOException, generating the message from errno.
*/
int jniThrowIOException(C_JNIEnv* env, int errnum);