X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvmcore%2Floader.c;h=a2b754e7b7209aa7cd7c76ccdfbe1f7a6d33fd1b;hb=204bf2cdfec73890037af529d67d396d30662a44;hp=6ab5036d36a2e3be509fc05fe9474f9dba0ac73f;hpb=88ac4a880c37a5974a0345c12a9252ad2c6f014a;p=cacao.git diff --git a/src/vmcore/loader.c b/src/vmcore/loader.c index 6ab5036d3..a2b754e7b 100644 --- a/src/vmcore/loader.c +++ b/src/vmcore/loader.c @@ -197,6 +197,16 @@ void loader_init(void) load_class_bootstrap(utf_new_char("java/lang/VMThrowable")); #endif + /* Important system exceptions. */ + + class_java_lang_Exception = load_class_bootstrap(utf_java_lang_Exception); + + class_java_lang_ClassNotFoundException = + load_class_bootstrap(utf_java_lang_ClassNotFoundException); + + class_java_lang_RuntimeException = + load_class_bootstrap(utf_java_lang_RuntimeException); + /* Some classes which may be used often. */ #if defined(ENABLE_JAVASE) @@ -1643,8 +1653,10 @@ static bool load_class_from_classbuffer_intern(classbuffer *cb) /* XXX This should be done better. */ tc = resolve_classref_or_classinfo_eager(CLASSREF_OR_CLASSINFO(cr), false); - if (tc == NULL) + if (tc == NULL) { + resolve_handle_pending_exception(true); return false; + } /* Interfaces are not allowed as super classes. */