When I call env->ThrowNew(clazz, "..."), will the subsequent execution of the C++/C method be stopped or do I have to stop it myself?
// This is the method which checks if a class can be loaded.
static inline jclass _check_find_class(JNIEnv* env, char* name) {
jclass clazz = env->FindClass(name);
if (clazz == NULL) {
env->ThrowNew(env->FindClass("java/lang/NoClassDefFoundError"), message);
}
return clazz;
}
// This method is called in other functions like
jclass load_main_class(JNIEnv* env) {
auto clazz = _check_find_class(env, "class/which/cannot/be/loaded");
do_stuff(env, clazz);
return clazz;
}
What is going to happen when I call load_main_class method, it isn't able to find the class and the ThrowNew method is called?