Lines Matching refs:ec

200     void formatAndAppend(const Format* formatter, const Formattable& arg, UErrorCode& ec) {
202 formatter->format(arg, s, ec);
203 if (U_SUCCESS(ec)) {
208 const UnicodeString &argString, UErrorCode& ec) {
210 if (U_SUCCESS(ec)) {
214 formatAndAppend(formatter, arg, ec);
314 UErrorCode ec = U_ZERO_ERROR;
315 copyObjects(that, ec);
316 if (U_FAILURE(ec)) {
379 UErrorCode ec = U_ZERO_ERROR;
380 copyObjects(that, ec);
381 if (U_FAILURE(ec)) {
410 UErrorCode ec = U_ZERO_ERROR;
417 for (; idx < count && rhs_idx < rhs_count && U_SUCCESS(ec); ++idx, ++rhs_idx) {
483 UErrorCode& ec)
485 if(U_FAILURE(ec)) {
488 msgPattern.parse(pattern, &parseError, ec);
489 cacheExplicitFormats(ec);
491 if (U_FAILURE(ec)) {
1308 void MessageFormat::copyObjects(const MessageFormat& that, UErrorCode& ec) {
1316 if (!allocateArgTypes(argTypeCount, ec)) {
1330 equalFormatsForHash, &ec);
1331 if (U_FAILURE(ec)) {
1339 for (idx = 0, pos = -1; idx < count && U_SUCCESS(ec); ++idx) {
1343 uhash_iput(cachedFormatters, cur->key.integer, newFormat, &ec);
1345 ec = U_MEMORY_ALLOCATION_ERROR;
1353 NULL, &ec);
1357 for (idx = 0, pos = -1; idx < count && U_SUCCESS(ec); ++idx) {
1359 uhash_iputi(customFormatArgStarts, cur->key.integer, cur->value.integer, &ec);
1370 UErrorCode& ec) const {
1372 if (U_FAILURE(ec)) {
1378 ec = U_ARGUMENT_TYPE_MISMATCH;
1478 ec = U_UNSUPPORTED_ERROR;
1482 ec = U_INTERNAL_PROGRAM_ERROR;
1501 UErrorCode ec = U_ZERO_ERROR;
1502 return parse(0, source, pos, count, ec);
1568 static Format* makeRBNF(URBNFRuleSetTag tag, const Locale& locale, const UnicodeString& defaultRuleSet, UErrorCode& ec) {
1569 RuleBasedNumberFormat* fmt = new RuleBasedNumberFormat(tag, locale, ec);
1571 ec = U_MEMORY_ALLOCATION_ERROR;
1572 } else if (U_SUCCESS(ec) && defaultRuleSet.length() > 0) {
1679 UErrorCode& ec) {
1680 if (U_FAILURE(ec)) {
1692 fmt = NumberFormat::createInstance(fLocale, ec);
1695 fmt = NumberFormat::createCurrencyInstance(fLocale, ec);
1698 fmt = NumberFormat::createPercentInstance(fLocale, ec);
1702 fmt = createIntegerFormat(fLocale, ec);
1705 fmt = NumberFormat::createInstance(fLocale, ec);
1709 decfmt->applyPattern(style,parseError,ec);
1738 fmt = makeRBNF(URBNF_SPELLOUT, fLocale, style, ec);
1742 fmt = makeRBNF(URBNF_ORDINAL, fLocale, style, ec);
1746 fmt = makeRBNF(URBNF_DURATION, fLocale, style, ec);
1750 ec = U_ILLEGAL_ARGUMENT_ERROR;
1804 const NumberFormat* MessageFormat::getDefaultNumberFormat(UErrorCode& ec) const {
1807 t->defaultNumberFormat = NumberFormat::createInstance(fLocale, ec);
1808 if (U_FAILURE(ec)) {
1812 ec = U_MEMORY_ALLOCATION_ERROR;
1825 const DateFormat* MessageFormat::getDefaultDateFormat(UErrorCode& ec) const {
1830 ec = U_MEMORY_ALLOCATION_ERROR;
1930 UErrorCode& ec) const {
1931 if (U_FAILURE(ec)) {
1936 t->rules = PluralRules::forLocale(msgFormat.fLocale, type, ec);
1937 if (U_FAILURE(ec)) {
1955 context.formatter = msgFormat.getDefaultNumberFormat(ec);
1958 U_ASSERT(context.number.getDouble(ec) == number); // argument number minus the offset
1959 context.formatter->format(context.number, context.numberString, ec);
1962 FixedDecimal dec = decFmt->getFixedDecimal(context.number, ec);