main_args = (MonoArray*)mono_array_new (domain, mono_defaults.string_class, 0);
}
- g_free (agent);
-
pa [0] = main_args;
mono_runtime_try_invoke (method, NULL, pa, exc, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ if (!is_ok (&error)) {
+ g_print ("The entry point method of assembly '%s' could not be executed due to %s\n", agent, mono_error_get_message (&error));
+ mono_error_cleanup (&error);
+ g_free (agent);
+ return 1;
+ }
+
+ g_free (agent);
return 0;
}