g_assert (klass);
- if (klass->exception_type) {
+ if (mono_class_has_failure (klass)) {
if (raise_on_error)
mono_raise_exception (mono_class_get_exception_for_failure (klass));
return NULL;
mono_loader_unlock ();
return runtime_info->domain_vtables [domain->domain_id];
}
- if (!klass->inited || klass->exception_type) {
- if (!mono_class_init (klass) || klass->exception_type) {
+ if (!klass->inited || mono_class_has_failure (klass)) {
+ if (!mono_class_init (klass) || mono_class_has_failure (klass)) {
mono_domain_unlock (domain);
mono_loader_unlock ();
if (raise_on_error)
mono_class_init (element_class);
/*mono_class_init can leave the vtable layout to be lazily done and we can't afford this here*/
- if (element_class->exception_type == MONO_EXCEPTION_NONE && !element_class->vtable_size)
+ if (!mono_class_has_failure (element_class) && !element_class->vtable_size)
mono_class_setup_vtable (element_class);
- if (element_class->exception_type != MONO_EXCEPTION_NONE) {
+ if (mono_class_has_failure (element_class)) {
/*Can happen if element_class only got bad after mono_class_setup_vtable*/
- if (klass->exception_type == MONO_EXCEPTION_NONE)
+ if (!mono_class_has_failure (klass))
mono_class_set_failure (klass, MONO_EXCEPTION_TYPE_LOAD, NULL);
mono_domain_unlock (domain);
mono_loader_unlock ();
/* Initialize klass->has_finalize */
mono_class_has_finalizer (klass);
- if (klass->exception_type) {
+ if (mono_class_has_failure (klass)) {
mono_domain_unlock (domain);
mono_loader_unlock ();
if (raise_on_error)
/* This is called at runtime, so avoid the slower search in metadata */
mono_class_setup_methods (klass);
- if (klass->exception_type)
+ if (mono_class_has_failure (klass))
return NULL;
im = mono_class_get_method_from_name (klass, "Invoke", -1);
return im;
/* This is called at runtime, so avoid the slower search in metadata */
mono_class_setup_methods (klass);
- if (klass->exception_type)
+ if (mono_class_has_failure (klass))
return NULL;
im = mono_class_get_method_from_name (klass, "BeginInvoke", -1);
return im;
/* This is called at runtime, so avoid the slower search in metadata */
mono_class_setup_methods (klass);
- if (klass->exception_type)
+ if (mono_class_has_failure (klass))
return NULL;
im = mono_class_get_method_from_name (klass, "EndInvoke", -1);
return im;