[sgen] Evacuate from emptier blocks to fuller ones
[mono.git] / mono / metadata / attach.c
index e41bbf7d02b175aae8861ad07c2960fe20016e29..45c3da535940aa408e9d54d699273f3e94370fbf 100644 (file)
@@ -311,7 +311,8 @@ mono_attach_load_agent (MonoDomain *domain, char *agent, char *args, MonoObject
        g_free (agent);
 
        pa [0] = main_args;
-       mono_runtime_invoke (method, NULL, pa, exc);
+       mono_runtime_try_invoke (method, NULL, pa, exc, &error);
+       mono_error_raise_exception (&error); /* FIXME don't raise here */
 
        return 0;
 }