is_neutral = ci->territory == 0;
if ((neutral && is_neutral) || (specific && !is_neutral)) {
culture = (MonoCultureInfo *) mono_object_new_checked (domain, klass, &error);
- mono_error_raise_exception (&error);
- mono_runtime_object_init ((MonoObject *) culture);
+ if (!is_ok (&error)) goto fail;
+ mono_runtime_object_init_checked ((MonoObject *) culture, &error);
+ if (!is_ok (&error)) goto fail;
construct_culture (culture, ci);
culture->use_user_override = TRUE;
mono_array_setref (ret, len++, culture);
}
return ret;
+
+fail:
+ mono_error_set_pending_exception (&error);
+ return ret;
}
int ves_icall_System_Globalization_CompareInfo_internal_compare (MonoCompareInfo *this_obj, MonoString *str1, gint32 off1, gint32 len1, MonoString *str2, gint32 off2, gint32 len2, gint32 options)