Lines Matching refs:errorCode
237 int32_t minPlaceholders, UErrorCode &errorCode) {
239 if (U_SUCCESS(errorCode) && patterns[index] == NULL) {
242 value.getUnicodeString(errorCode), minPlaceholders, 1, errorCode);
244 if (U_SUCCESS(errorCode) && patterns[index] == NULL) {
245 errorCode = U_MEMORY_ALLOCATION_ERROR;
250 void setDnamIfAbsent(const ResourceValue &value, UErrorCode& errorCode) {
253 cacheData.dnams[unitIndex][width] = value.getString(length, errorCode);
261 void consumePattern(const char *key, const ResourceValue &value, UErrorCode &errorCode) {
262 if (U_FAILURE(errorCode)) { return; }
265 setDnamIfAbsent(value, errorCode);
268 setFormatterIfAbsent(MeasureFormatCacheData::PER_UNIT_INDEX, value, 1, errorCode);
273 setFormatterIfAbsent(StandardPlural::indexFromString(key, errorCode), value, 0,
274 errorCode);
282 void consumeSubtypeTable(const char *key, ResourceValue &value, UErrorCode &errorCode) {
283 if (U_FAILURE(errorCode)) { return; }
293 setFormatterIfAbsent(StandardPlural::OTHER, value, 0, errorCode);
296 ResourceTable patternTableTable = value.getTable(errorCode);
297 if (U_FAILURE(errorCode)) { return; }
299 consumePattern(key, value, errorCode);
312 void consumeCompoundPattern(const char *key, const ResourceValue &value, UErrorCode &errorCode) {
313 if (U_SUCCESS(errorCode) && uprv_strcmp(key, "per") == 0) {
315 applyPatternMinMaxArguments(value.getUnicodeString(errorCode), 2, 2, errorCode);
324 void consumeUnitTypesTable(const char *key, ResourceValue &value, UErrorCode &errorCode) {
325 if (U_FAILURE(errorCode)) { return; }
330 ResourceTable compoundTable = value.getTable(errorCode);
331 if (U_FAILURE(errorCode)) { return; }
333 consumeCompoundPattern(key, value, errorCode);
338 ResourceTable subtypeTable = value.getTable(errorCode);
339 if (U_FAILURE(errorCode)) { return; }
341 consumeSubtypeTable(key, value, errorCode);
346 void consumeAlias(const char *key, const ResourceValue &value, UErrorCode &errorCode) {
355 UMeasureFormatWidth targetWidth = widthFromAlias(value, errorCode);
358 errorCode = U_INVALID_FORMAT_ERROR;
363 errorCode = U_INVALID_FORMAT_ERROR;
369 void consumeTable(const char *key, ResourceValue &value, UErrorCode &errorCode) {
370 if (U_SUCCESS(errorCode) && (width = widthFromKey(key)) != UMEASFMT_WIDTH_COUNT) {
371 ResourceTable unitTypesTable = value.getTable(errorCode);
372 if (U_FAILURE(errorCode)) { return; }
374 consumeUnitTypesTable(key, value, errorCode);
393 static UMeasureFormatWidth widthFromAlias(const ResourceValue &value, UErrorCode &errorCode) {
395 const UChar *s = value.getAliasString(length, errorCode);
397 if (U_SUCCESS(errorCode) && length >= 13 && u_memcmp(s, g_LOCALE_units, 13) == 0) {
412 UErrorCode &errorCode) {
414 ResourceTable widthsTable = value.getTable(errorCode);
415 if (U_FAILURE(errorCode)) { return; }
418 consumeAlias(key, value, errorCode);
420 consumeTable(key, value, errorCode);
1109 UErrorCode &errorCode) const {
1110 if (U_FAILURE(errorCode)) {
1115 errorCode = U_MISSING_RESOURCE_ERROR;
1122 UErrorCode &errorCode) const {
1123 if (U_FAILURE(errorCode)) {
1132 return getFormatter(unit, width, StandardPlural::OTHER, errorCode);