comparison src/share/vm/graal/graalVMEntries.cpp @ 3552:aa7b62997aa0

better error message of field not found
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Mon, 22 Aug 2011 14:40:08 +0200
parents 25765a764212
children 22d11b3bc561
comparison
equal deleted inserted replaced
3551:7d9e3ee49ac9 3552:aa7b62997aa0
745 745
746 // helpers used to set fields in the HotSpotVMConfig object 746 // helpers used to set fields in the HotSpotVMConfig object
747 jfieldID getFieldID(JNIEnv* env, jobject obj, const char* name, const char* sig) { 747 jfieldID getFieldID(JNIEnv* env, jobject obj, const char* name, const char* sig) {
748 jfieldID id = env->GetFieldID(env->GetObjectClass(obj), name, sig); 748 jfieldID id = env->GetFieldID(env->GetObjectClass(obj), name, sig);
749 if (id == NULL) { 749 if (id == NULL) {
750 TRACE_graal_1("field not found: %s (%s)", name, sig); 750 fatal(err_msg("field not found: %s (%s)", name, sig));
751 fatal("field not found");
752 } 751 }
753 return id; 752 return id;
754 } 753 }
755 754
756 void set_boolean(JNIEnv* env, jobject obj, const char* name, bool value) { env->SetBooleanField(obj, getFieldID(env, obj, name, "Z"), value); } 755 void set_boolean(JNIEnv* env, jobject obj, const char* name, bool value) { env->SetBooleanField(obj, getFieldID(env, obj, name, "Z"), value); }