Lines Matching refs:ec
201 void formatAndAppend(const Format* formatter, const Formattable& arg, UErrorCode& ec) {
203 formatter->format(arg, s, ec);
204 if (U_SUCCESS(ec)) {
209 const UnicodeString &argString, UErrorCode& ec) {
211 if (U_SUCCESS(ec)) {
215 formatAndAppend(formatter, arg, ec);
315 UErrorCode ec = U_ZERO_ERROR;
316 copyObjects(that, ec);
317 if (U_FAILURE(ec)) {
380 UErrorCode ec = U_ZERO_ERROR;
381 copyObjects(that, ec);
382 if (U_FAILURE(ec)) {
411 UErrorCode ec = U_ZERO_ERROR;
418 for (; idx < count && rhs_idx < rhs_count && U_SUCCESS(ec); ++idx, ++rhs_idx) {
484 UErrorCode& ec)
486 if(U_FAILURE(ec)) {
489 msgPattern.parse(pattern, &parseError, ec);
490 cacheExplicitFormats(ec);
492 if (U_FAILURE(ec)) {
1305 void MessageFormat::copyObjects(const MessageFormat& that, UErrorCode& ec) {
1313 if (!allocateArgTypes(argTypeCount, ec)) {
1327 equalFormatsForHash, &ec);
1328 if (U_FAILURE(ec)) {
1336 for (idx = 0, pos = UHASH_FIRST; idx < count && U_SUCCESS(ec); ++idx) {
1340 uhash_iput(cachedFormatters, cur->key.integer, newFormat, &ec);
1342 ec = U_MEMORY_ALLOCATION_ERROR;
1350 NULL, &ec);
1354 for (idx = 0, pos = UHASH_FIRST; idx < count && U_SUCCESS(ec); ++idx) {
1356 uhash_iputi(customFormatArgStarts, cur->key.integer, cur->value.integer, &ec);
1367 UErrorCode& ec) const {
1369 if (U_FAILURE(ec)) {
1375 ec = U_ARGUMENT_TYPE_MISMATCH;
1475 ec = U_UNSUPPORTED_ERROR;
1479 ec = U_INTERNAL_PROGRAM_ERROR;
1498 UErrorCode ec = U_ZERO_ERROR;
1499 return parse(0, source, pos, count, ec);
1565 static Format* makeRBNF(URBNFRuleSetTag tag, const Locale& locale, const UnicodeString& defaultRuleSet, UErrorCode& ec) {
1566 RuleBasedNumberFormat* fmt = new RuleBasedNumberFormat(tag, locale, ec);
1568 ec = U_MEMORY_ALLOCATION_ERROR;
1569 } else if (U_SUCCESS(ec) && defaultRuleSet.length() > 0) {
1676 UErrorCode& ec) {
1677 if (U_FAILURE(ec)) {
1689 fmt = NumberFormat::createInstance(fLocale, ec);
1692 fmt = NumberFormat::createCurrencyInstance(fLocale, ec);
1695 fmt = NumberFormat::createPercentInstance(fLocale, ec);
1699 fmt = createIntegerFormat(fLocale, ec);
1702 fmt = NumberFormat::createInstance(fLocale, ec);
1706 decfmt->applyPattern(style,parseError,ec);
1735 fmt = makeRBNF(URBNF_SPELLOUT, fLocale, style, ec);
1739 fmt = makeRBNF(URBNF_ORDINAL, fLocale, style, ec);
1743 fmt = makeRBNF(URBNF_DURATION, fLocale, style, ec);
1747 ec = U_ILLEGAL_ARGUMENT_ERROR;
1801 const NumberFormat* MessageFormat::getDefaultNumberFormat(UErrorCode& ec) const {
1804 t->defaultNumberFormat = NumberFormat::createInstance(fLocale, ec);
1805 if (U_FAILURE(ec)) {
1809 ec = U_MEMORY_ALLOCATION_ERROR;
1822 const DateFormat* MessageFormat::getDefaultDateFormat(UErrorCode& ec) const {
1827 ec = U_MEMORY_ALLOCATION_ERROR;
1927 UErrorCode& ec) const {
1928 if (U_FAILURE(ec)) {
1933 t->rules = PluralRules::forLocale(msgFormat.fLocale, type, ec);
1934 if (U_FAILURE(ec)) {
1952 context.formatter = msgFormat.getDefaultNumberFormat(ec);
1955 U_ASSERT(context.number.getDouble(ec) == number); // argument number minus the offset
1956 context.formatter->format(context.number, context.numberString, ec);
1960 decFmt->initVisibleDigitsWithExponent(context.number, digits, ec);
1961 if (U_FAILURE(ec)) {