* metadata/object.c:
* mini/mini.c:
Ensure that exceptions get propagated back to the caller
when mono is being embedded.
License: MIT/X11
MonoVTable *module_vtable = mono_class_vtable_full (vtable->domain, module_klass, raise_exception);
if (!module_vtable)
return NULL;
- mono_runtime_class_init (module_vtable);
+ exc = mono_runtime_class_init_full (module_vtable, raise_exception);
+ if (exc)
+ return exc;
}
}
method = mono_class_get_cctor (klass);
/* We can't use a domain specific method in another domain */
if (! ((domain != target_domain) && !info->domain_neutral)) {
MonoVTable *vtable;
+ MonoException *tmpEx;
mono_jit_stats.methods_lookups++;
vtable = mono_class_vtable (domain, method->klass);
g_assert (vtable);
- mono_runtime_class_init (vtable);
+ tmpEx = mono_runtime_class_init_full (vtable, ex == NULL);
+ if (tmpEx) {
+ *ex = tmpEx;
+ return NULL;
+ }
return mono_create_ftnptr (target_domain, info->code_start);
}
}