Lines Matching defs:errorCode
75 UErrorCode errorCode = U_ZERO_ERROR;
84 errorCode = U_ZERO_ERROR;
86 subBundle = ures_getNextResource(currentBundle, NULL, &errorCode);
87 if (U_FAILURE(errorCode)) {
88 log_err("Can't open a resource for lnocale %s. Error: %s\n", locale, u_errorName(errorCode));
94 subRootBundle = ures_getByKey(root, subBundleKey, NULL, &errorCode);
95 if (U_FAILURE(errorCode)) {
120 const int32_t *subRootBundleArr = ures_getIntVector(subRootBundle, &minSize, &errorCode);
121 const int32_t *subBundleArr = ures_getIntVector(subBundle, &subBundleSize, &errorCode);
156 UResourceBundle *subSubBundle = ures_getByIndex(subBundle, 0, NULL, &errorCode);
157 UResourceBundle *subSubRootBundle = ures_getByIndex(subRootBundle, 0, NULL, &errorCode);
159 if (U_SUCCESS(errorCode)
197 const UChar *rootStr = ures_getStringByIndex(subRootBundle,idx,&rootStrLen,&errorCode);
198 const UChar *localeStr = ures_getStringByIndex(subBundle,idx,&localeStrLen,&errorCode);
199 if (rootStr && localeStr && U_SUCCESS(errorCode)) {
208 errorCode = U_ZERO_ERROR;
209 arr = ures_getByIndex(subBundle,idx,NULL,&errorCode);
210 if (U_FAILURE(errorCode)) {
228 localeStr = ures_getStringByIndex(arr,0,&localeStrLen,&errorCode);
230 if (U_FAILURE(errorCode)) {
329 const UChar *string = ures_getString(subBundle, &len, &errorCode);
330 if (U_FAILURE(errorCode) || string == NULL) {
389 else if (strcmp(locale, "root") != 0 && errorCode == U_ZERO_ERROR) {
391 const UChar *rootString = ures_getString(subRootBundle, &len, &errorCode);
392 if (U_FAILURE(errorCode) || rootString == NULL) {
492 UErrorCode errorCode = U_ZERO_ERROR;
500 errorCode=U_ZERO_ERROR;
510 root = ures_openDirect(NULL, locName, &errorCode);
511 if(U_FAILURE(errorCode)) {
520 root = ures_openDirect(loadTestData(&errorCode), "structLocale", &errorCode);
521 if(U_FAILURE(errorCode)) {
526 errorCode=U_ZERO_ERROR;
528 currentLocale = ures_open(NULL, currLoc, &errorCode);
529 if(errorCode != U_ZERO_ERROR) {
530 if(U_SUCCESS(errorCode)) {
534 uloc_getAvailable(locIndex), u_errorName(errorCode));
537 u_errorName(errorCode),
543 ures_getStringByKey(currentLocale, "Version", NULL, &errorCode);
544 if(errorCode != U_ZERO_ERROR) {
548 else if (ures_getStringByKey(currentLocale, "Version", NULL, &errorCode)[0] == (UChar)(0x78)) {
552 resolvedLoc = ures_getLocaleByType(currentLocale, ULOC_ACTUAL_LOCALE, &errorCode);
582 UErrorCode errorCode = U_ZERO_ERROR;
592 const UChar *fromBundleStr = ures_getStringByIndex(fromArray, idx, NULL, &errorCode);
593 const UChar *toBundleStr = ures_getStringByIndex(toArray, idx, NULL, &errorCode);
609 UErrorCode errorCode = U_ZERO_ERROR;
611 UResourceBundle *fromLocaleBund = ures_open(NULL, fromLocale, &errorCode);
612 UResourceBundle *toLocaleBund = ures_open(NULL, toLocale, &errorCode);
615 if(U_FAILURE(errorCode)) {
616 log_err("Can't open resource bundle %s or %s - %s\n", fromLocale, toLocale, u_errorName(errorCode));
619 fromCalendar = ures_getByKey(fromLocaleBund, "calendar", NULL, &errorCode);
620 fromGregorian = ures_getByKeyWithFallback(fromCalendar, "gregorian", NULL, &errorCode);
622 toCalendar = ures_getByKey(toLocaleBund, "calendar", NULL, &errorCode);
623 toGregorian = ures_getByKeyWithFallback(toCalendar, "gregorian", NULL, &errorCode);
625 fromArray = ures_getByKey(fromLocaleBund, "CurrencyElements", NULL, &errorCode);
626 toArray = ures_getByKey(toLocaleBund, "CurrencyElements", NULL, &errorCode);
635 fromArray = ures_getByKey(fromLocaleBund, "NumberPatterns", NULL, &errorCode);
636 toArray = ures_getByKey(toLocaleBund, "NumberPatterns", NULL, &errorCode);
646 fromArray = ures_getByKey(fromLocaleBund, "DateTimePatterns", NULL, &errorCode);
647 toArray = ures_getByKey(toLocaleBund, "DateTimePatterns", NULL, &errorCode);
654 fromArray = ures_getByKey(fromLocaleBund, "NumberElements", NULL, &errorCode);
655 toArray = ures_getByKey(toLocaleBund, "NumberElements", NULL, &errorCode);
685 UErrorCode errorCode = U_ZERO_ERROR;
690 errorCode=U_ZERO_ERROR;
691 fromCountryLen = uloc_getCountry(fromLocale, fromCountry, ULOC_FULLNAME_CAPACITY, &errorCode);
696 fromVariantLen = uloc_getVariant(fromLocale, fromVariant, ULOC_FULLNAME_CAPACITY, &errorCode);
707 toCountryLen = uloc_getCountry(toLocale, toCountry, ULOC_FULLNAME_CAPACITY, &errorCode);
708 if(U_FAILURE(errorCode)) {
709 log_err("Unknown failure fromLocale=%s toLocale=%s errorCode=%s\n",
710 fromLocale, toLocale, u_errorName(errorCode));
718 toVariantLen = uloc_getVariant(toLocale, toVariant, ULOC_FULLNAME_CAPACITY, &errorCode);
737 UErrorCode errorCode = U_ZERO_ERROR;
738 USet *origSet = uset_openPatternOptions(exemplarCharacters, exemplarLen, USET_CASE_INSENSITIVE, &errorCode);
739 USet *exemplarSet = createFlattenSet(origSet, &errorCode);
742 errorCode)) {
743 log_err("%s: error uset_openPattern returned %s\n", currLoc, u_errorName(errorCode));
876 UErrorCode errorCode = U_ZERO_ERROR;
890 root = ures_openDirect(NULL, "root", &errorCode);
891 if(U_FAILURE(errorCode)) {
896 errorCode=U_ZERO_ERROR;
898 currentLocale = ures_open(NULL, currLoc, &errorCode);
899 if(errorCode != U_ZERO_ERROR) {
900 if(U_SUCCESS(errorCode)) {
907 u_errorName(errorCode),
913 exemplarCharacters = ures_getStringByKey(currentLocale, "ExemplarCharacters", &exemplarLen, &errorCode);
914 if (U_FAILURE(errorCode)) {
915 log_err("error ures_getStringByKey returned %s\n", u_errorName(errorCode));
928 langSize = uloc_getDisplayLanguage(currLoc, currLoc, langBuffer, sizeof(langBuffer)/sizeof(langBuffer[0]), &errorCode);
929 if (U_FAILURE(errorCode)) {
930 log_err("error uloc_getDisplayLanguage returned %s\n", u_errorName(errorCode));
939 langSize = uloc_getDisplayCountry(currLoc, currLoc, langBuffer, sizeof(langBuffer)/sizeof(langBuffer[0]), &errorCode);
940 if (U_FAILURE(errorCode)) {
941 log_err("error uloc_getDisplayCountry returned %s\n", u_errorName(errorCode));
951 UResourceBundle* cal = ures_getByKey(currentLocale, "calendar", NULL, &errorCode);
952 UResourceBundle* greg = ures_getByKeyWithFallback(cal, "gregorian", NULL, &errorCode);
953 UResourceBundle* names = ures_getByKeyWithFallback(greg, "dayNames", NULL, &errorCode);
954 UResourceBundle* format = ures_getByKeyWithFallback(names, "format", NULL, &errorCode);
955 resArray = ures_getByKeyWithFallback(format, "wide", NULL, &errorCode);
957 if (U_FAILURE(errorCode)) {
958 log_err("error ures_getByKey returned %s\n", u_errorName(errorCode));
969 const UChar *fromBundleStr = ures_getStringByIndex(resArray, idx, &langSize, &errorCode);
970 if (U_FAILURE(errorCode)) {
971 log_err("error ures_getStringByIndex(%d) returned %s\n", idx, u_errorName(errorCode));
986 names = ures_getByKeyWithFallback(greg, "monthNames", NULL, &errorCode);
987 format = ures_getByKeyWithFallback(names,"format", NULL, &errorCode);
988 resArray = ures_getByKeyWithFallback(format, "wide", NULL, &errorCode);
989 if (U_FAILURE(errorCode)) {
990 log_err("error ures_getByKey returned %s\n", u_errorName(errorCode));
1000 const UChar *fromBundleStr = ures_getStringByIndex(resArray, idx, &langSize, &errorCode);
1001 if (U_FAILURE(errorCode)) {
1002 log_err("error ures_getStringByIndex(%d) returned %s\n", idx, u_errorName(errorCode));
1019 errorCode = U_ZERO_ERROR;
1020 numScripts = uscript_getCode(currLoc, scripts, sizeof(scripts)/sizeof(scripts[0]), &errorCode);
1029 ULocaleData *uld = ulocdata_open(currLoc,&errorCode);
1030 USet *exemplarSet = ulocdata_getExemplarSet(uld, NULL, 0, ULOCDATA_ES_STANDARD, &errorCode);
1040 ulocdata_getPaperSize(currLoc, &height, &width, &errorCode);
1041 if(U_FAILURE(errorCode)){
1042 log_err("ulocdata_getPaperSize failed for locale %s with error: %s \n", currLoc, u_errorName(errorCode));
1050 UMeasurementSystem measurementSystem = ulocdata_getMeasurementSystem(currLoc, &errorCode);
1051 if(U_FAILURE(errorCode)){
1052 log_err("ulocdata_getMeasurementSystem failed for locale %s with error: %s \n", currLoc, u_errorName(errorCode));
1285 UErrorCode errorCode = U_ZERO_ERROR;
1287 UEnumeration *en = ucurr_openISOCurrencies(UCURR_ALL, &errorCode);
1290 UResourceBundle *currencies = ures_openDirect(loadTestData(&errorCode), "structLocale", &errorCode);
1291 if(U_FAILURE(errorCode)) {
1295 currencies = ures_getByKey(currencies, "Currencies", currencies, &errorCode);
1296 currencyCount = uenum_count(en, &errorCode);
1302 while ((isoCode = uenum_next(en, NULL, &errorCode)) != NULL && ures_hasNext(currencies)) {
1303 subBundle = ures_getNextResource(currencies, NULL, &errorCode);
1321 UErrorCode errorCode = U_ZERO_ERROR;
1336 if (ucurr_isAvailable(isoCode, U_DATE_MIN, U_DATE_MAX, &errorCode) == FALSE) {
1341 if (ucurr_isAvailable(isoCode, U_DATE_MIN, U_DATE_MAX, &errorCode) == FALSE) {
1346 if (ucurr_isAvailable(isoCode, U_DATE_MIN, U_DATE_MAX, &errorCode) == TRUE) {
1351 if (ucurr_isAvailable(isoCode, U_DATE_MIN, U_DATE_MAX, &errorCode) == FALSE) {
1358 if (ucurr_isAvailable(isoCode, date1970, U_DATE_MAX, &errorCode) == FALSE) {
1362 if (ucurr_isAvailable(isoCode, date1975, U_DATE_MAX, &errorCode) == FALSE) {
1366 if (ucurr_isAvailable(isoCode, date1981, U_DATE_MAX, &errorCode) == TRUE) {
1371 if (ucurr_isAvailable(isoCode, U_DATE_MIN, date1970, &errorCode) == TRUE) {
1375 if (ucurr_isAvailable(isoCode, U_DATE_MIN, date1975, &errorCode) == FALSE) {
1379 if (ucurr_isAvailable(isoCode, U_DATE_MIN, date1981, &errorCode) == FALSE) {
1384 if (ucurr_isAvailable(isoCode, date1975, date1978, &errorCode) == FALSE) {
1388 if (ucurr_isAvailable(isoCode, date1970, date1975, &errorCode) == FALSE) {
1392 if (ucurr_isAvailable(isoCode, date1975, date1981, &errorCode) == FALSE) {
1396 if (ucurr_isAvailable(isoCode, date1970, date1981, &errorCode) == FALSE) {
1400 if (ucurr_isAvailable(isoCode, date1981, date1992, &errorCode) == TRUE) {
1404 if (ucurr_isAvailable(isoCode, date1950, date1970, &errorCode) == TRUE) {
1409 if (ucurr_isAvailable(isoCode, date1975, date1970, &errorCode) == TRUE) {
1411 } else if (errorCode != U_ILLEGAL_ARGUMENT_ERROR) {