Home | History | Annotate | Download | only in i18n

Lines Matching refs:errorCode

81 CollationLoader::loadRootRules(UErrorCode &errorCode) {
82 if(U_FAILURE(errorCode)) { return; }
83 rootBundle = ures_open(U_ICUDATA_COLL, kRootLocaleName, &errorCode);
84 if(U_FAILURE(errorCode)) { return; }
85 rootRules = ures_getStringByKey(rootBundle, "UCARules", &rootRulesLength, &errorCode);
86 if(U_FAILURE(errorCode)) {
96 UErrorCode errorCode = U_ZERO_ERROR;
97 umtx_initOnce(gInitOnce, CollationLoader::loadRootRules, errorCode);
98 if(U_SUCCESS(errorCode)) {
104 CollationLoader::loadRules(const char *localeID, const char *collationType, UErrorCode &errorCode) {
105 if(U_FAILURE(errorCode)) { return NULL; }
111 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
117 LocalUResourceBundlePointer bundle(ures_open(U_ICUDATA_COLL, localeID, &errorCode));
119 ures_getByKey(bundle.getAlias(), "collations", NULL, &errorCode));
121 ures_getByKeyWithFallback(collations.getAlias(), type, NULL, &errorCode));
123 const UChar *s = ures_getStringByKey(data.getAlias(), "Sequence", &length, &errorCode);
124 if(U_FAILURE(errorCode)) { return NULL; }
129 errorCode = U_MEMORY_ALLOCATION_ERROR;
136 CollationLoader::loadTailoring(const Locale &locale, Locale &validLocale, UErrorCode &errorCode) {
137 const CollationTailoring *root = CollationRoot::getRoot(errorCode);
138 if(U_FAILURE(errorCode)) { return NULL; }
145 LocalUResourceBundlePointer bundle(ures_open(U_ICUDATA_COLL, name, &errorCode));
146 if(errorCode == U_MISSING_RESOURCE_ERROR) {
147 errorCode = U_USING_DEFAULT_WARNING;
151 const char *vLocale = ures_getLocaleByType(bundle.getAlias(), ULOC_ACTUAL_LOCALE, &errorCode);
152 if(U_FAILURE(errorCode)) { return NULL; }
157 ures_getByKey(bundle.getAlias(), "collations", NULL, &errorCode));
158 if(errorCode == U_MISSING_RESOURCE_ERROR) {
159 errorCode = U_USING_DEFAULT_WARNING;
162 if(U_FAILURE(errorCode)) { return NULL; }
166 int32_t typeLength = locale.getKeywordValue("collation", type, LENGTHOF(type) - 1, errorCode);
167 if(U_FAILURE(errorCode)) {
168 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
195 ures_getByKeyWithFallback(collations.getAlias(), type, NULL, &errorCode));
196 if(errorCode == U_MISSING_RESOURCE_ERROR &&
201 errorCode = U_ZERO_ERROR;
203 ures_getByKeyWithFallback(collations.getAlias(), type, NULL, &errorCode));
205 if(errorCode == U_MISSING_RESOURCE_ERROR && uprv_strcmp(type, defaultType) != 0) {
209 errorCode = U_ZERO_ERROR;
211 ures_getByKeyWithFallback(collations.getAlias(), type, NULL, &errorCode));
213 if(errorCode == U_MISSING_RESOURCE_ERROR && uprv_strcmp(type, "standard") != 0) {
217 errorCode = U_ZERO_ERROR;
219 ures_getByKeyWithFallback(collations.getAlias(), type, NULL, &errorCode));
221 if(errorCode == U_MISSING_RESOURCE_ERROR) {
222 errorCode = U_USING_DEFAULT_WARNING;
225 if(U_FAILURE(errorCode)) { return NULL; }
229 errorCode = U_MEMORY_ALLOCATION_ERROR;
234 const char *actualLocale = ures_getLocaleByType(data.getAlias(), ULOC_ACTUAL_LOCALE, &errorCode);
235 if(U_FAILURE(errorCode)) { return NULL; }
239 errorCode = U_USING_DEFAULT_WARNING;
247 ures_getByKey(data.getAlias(), "%%CollationBin", NULL, &errorCode));
251 const uint8_t *inBytes = ures_getBinary(binary.getAlias(), &length, &errorCode);
252 if(U_FAILURE(errorCode)) { return NULL; }
253 CollationDataReader::read(root, inBytes, length, *t, errorCode);
256 if(U_FAILURE(errorCode)) { return NULL; }
264 if(U_SUCCESS(errorCode)) {
273 validLocale.setKeywordValue("collation", type, errorCode);
274 if(U_FAILURE(errorCode)) { return NULL; }
285 ures_open(U_ICUDATA_COLL, actualLocale, &errorCode));
286 if(U_FAILURE(errorCode)) { return NULL; }
300 t->actualLocale.setKeywordValue("collation", type, errorCode);
301 if(U_FAILURE(errorCode)) { return NULL; }
305 errorCode = U_USING_DEFAULT_WARNING;