+mono_get_exception_type_initialization (const gchar *type_name, MonoException *inner)
+{
+ MonoClass *klass;
+ gpointer args [2];
+ MonoObject *exc;
+ MonoMethod *method;
+ gpointer iter;
+
+ klass = mono_class_from_name (mono_get_corlib (), "System", "TypeInitializationException");
+ g_assert (klass);
+
+ mono_class_init (klass);
+
+ /* TypeInitializationException only has 1 ctor with 2 args */
+ iter = NULL;
+ while ((method = mono_class_get_methods (klass, &iter))) {
+ if (!strcmp (".ctor", mono_method_get_name (method)) && mono_method_signature (method)->param_count == 2)
+ break;
+ method = NULL;
+ }
+
+ g_assert (method);
+
+ args [0] = mono_string_new (mono_domain_get (), type_name);
+ args [1] = inner;
+
+ exc = mono_object_new (mono_domain_get (), klass);
+ mono_runtime_invoke (method, exc, args, NULL);
+
+ return (MonoException *) exc;
+}
+
+/**
+ * mono_get_exception_synchronization_lock:
+ * @inner: the inner exception.
+ *
+ * Returns: a new instance of the System.TypeInitializationException
+ */
+MonoException *
+mono_get_exception_synchronization_lock (const char *msg)
+{
+ return mono_exception_from_name_msg (mono_get_corlib (), "System.Threading", "SynchronizationLockException", msg);
+}
+
+/**
+ * mono_get_exception_cannot_unload_appdomain:
+ * @inner: the inner exception.
+ *
+ * Returns: a new instance of the System.CannotUnloadAppDomainException
+ */
+MonoException *
+mono_get_exception_cannot_unload_appdomain (const char *msg)
+{
+ return mono_exception_from_name_msg (mono_get_corlib (), "System", "CannotUnloadAppDomainException", msg);
+}
+
+/**
+ * mono_get_exception_appdomain_unloaded
+ *
+ * Returns: a new instance of the System.AppDomainUnloadedException
+ */
+MonoException *
+mono_get_exception_appdomain_unloaded (void)