[runtime] Introduce kind test functions to cleanup things a bit.
[mono.git] / mono / metadata / runtime.c
index 1c41c797db4fa2c235cd84398bf04cdf7f45541b..078b4cef997d8ec11653d69df65bba2bd521bf1a 100644 (file)
@@ -57,6 +57,7 @@ mono_runtime_is_shutting_down (void)
 static void
 fire_process_exit_event (MonoDomain *domain, gpointer user_data)
 {
+       MonoError error;
        MonoClassField *field;
        gpointer pa [2];
        MonoObject *delegate, *exc;
@@ -70,7 +71,8 @@ fire_process_exit_event (MonoDomain *domain, gpointer user_data)
 
        pa [0] = domain;
        pa [1] = NULL;
-       mono_runtime_delegate_invoke (delegate, pa, &exc);
+       mono_runtime_delegate_try_invoke (delegate, pa, &exc, &error);
+       mono_error_cleanup (&error);
 }
 
 static void