in src/main/c/h3-java/src/jniapi.c [65:84]
void ThrowOutOfMemoryError(JNIEnv *env) {
// Alternately, we could call the JNI function FatalError(JNIEnv *env, const
// char *msg)
jclass oome = (**env).FindClass(env, "java/lang/OutOfMemoryError");
if (oome != NULL) {
jmethodID oomeConstructor =
(**env).GetMethodID(env, oome, "<init>", "()V");
if (oomeConstructor != NULL) {
jthrowable oomeInstance =
(jthrowable)((**env).NewObject(env, oome, oomeConstructor));
if (oomeInstance != NULL) {
(**env).ExceptionClear(env);
(**env).Throw(env, oomeInstance);
}
}
}
}