}
static void
-report_loader_error (MonoAotCompile *acfg, MonoError *error, const char *format, ...)
+report_loader_error (MonoAotCompile *acfg, MonoError *error, gboolean fatal, const char *format, ...)
{
FILE *output;
va_list args;
va_end (args);
mono_error_cleanup (error);
- if (acfg->is_full_aot) {
+ if (acfg->is_full_aot && fatal) {
fprintf (output, "FullAOT cannot continue if there are loader errors.\n");
exit (1);
}
gboolean skip = FALSE;
method = mono_get_method_checked (acfg->image, token, NULL, NULL, &error);
- report_loader_error (acfg, &error, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
+ report_loader_error (acfg, &error, TRUE, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
if ((method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) ||
(method->iflags & METHOD_IMPL_ATTRIBUTE_RUNTIME) ||
MonoError error;
token = MONO_TOKEN_METHOD_DEF | (i + 1);
method = mono_get_method_checked (acfg->image, token, NULL, NULL, &error);
- report_loader_error (acfg, &error, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
+ report_loader_error (acfg, &error, TRUE, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
if (method->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED) {
if (method->is_generic) {
guint32 token = MONO_TOKEN_METHOD_DEF | (i + 1);
method = mono_get_method_checked (acfg->image, token, NULL, NULL, &error);
- report_loader_error (acfg, &error, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
+ report_loader_error (acfg, &error, TRUE, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
if ((method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) ||
(method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL)) {
int j;
method = mono_get_method_checked (acfg->image, token, NULL, NULL, &error);
- report_loader_error (acfg, &error, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
+ report_loader_error (acfg, &error, TRUE, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
/*
* Only generate native-to-managed wrappers for methods which have an
cattr = mono_custom_attrs_from_method_checked (method, &error);
if (!is_ok (&error)) {
char *name = mono_method_get_full_name (method);
- report_loader_error (acfg, &error, "Failed to load custom attributes from method %s due to %s\n", name, mono_error_get_message (&error));
+ report_loader_error (acfg, &error, TRUE, "Failed to load custom attributes from method %s due to %s\n", name, mono_error_get_message (&error));
g_free (name);
}
if (cfg->exception_type != MONO_EXCEPTION_NONE) {
/* Some instances cannot be JITted due to constraints etc. */
if (!method->is_inflated)
- report_loader_error (acfg, &cfg->error, "Unable to compile method '%s' due to: '%s'.\n", mono_method_get_full_name (method), mono_error_get_message (&cfg->error));
+ report_loader_error (acfg, &cfg->error, FALSE, "Unable to compile method '%s' due to: '%s'.\n", mono_method_get_full_name (method), mono_error_get_message (&cfg->error));
/* Let the exception happen at runtime */
return;
}
continue;
method = mono_get_method_checked (acfg->image, token, NULL, NULL, &error);
- report_loader_error (acfg, &error, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
+ report_loader_error (acfg, &error, TRUE, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
if (method->is_generic || mono_class_is_gtd (method->klass)) {
MonoMethod *gshared;