• Home
  • Raw
  • Download

Lines Matching refs:errorCode

154                                      const RuleBasedCollator *base, UErrorCode &errorCode)  in RuleBasedCollator()  argument
162 if(U_FAILURE(errorCode)) { return; } in RuleBasedCollator()
164 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in RuleBasedCollator()
167 const CollationTailoring *root = CollationRoot::getRoot(errorCode); in RuleBasedCollator()
168 if(U_FAILURE(errorCode)) { return; } in RuleBasedCollator()
170 errorCode = U_UNSUPPORTED_ERROR; in RuleBasedCollator()
175 errorCode = U_MEMORY_ALLOCATION_ERROR; in RuleBasedCollator()
178 CollationDataReader::read(base->tailoring, bin, length, *t, errorCode); in RuleBasedCollator()
179 if(U_FAILURE(errorCode)) { return; } in RuleBasedCollator()
181 adoptTailoring(t.orphan(), errorCode); in RuleBasedCollator()
202 RuleBasedCollator::adoptTailoring(CollationTailoring *t, UErrorCode &errorCode) { in adoptTailoring() argument
203 if(U_FAILURE(errorCode)) { in adoptTailoring()
210 errorCode = U_MEMORY_ALLOCATION_ERROR; in adoptTailoring()
261 UErrorCode errorCode = U_ZERO_ERROR; variable
262 LocalPointer<UnicodeSet> thisTailored(getTailoredSet(errorCode));
263 LocalPointer<UnicodeSet> otherTailored(o.getTailoredSet(errorCode));
264 if(U_FAILURE(errorCode)) { return false; }
279 UErrorCode errorCode = U_ZERO_ERROR; in hashCode() local
280 LocalPointer<UnicodeSet> set(getTailoredSet(errorCode)); in hashCode()
281 if(U_FAILURE(errorCode)) { return 0; } in hashCode()
305 RuleBasedCollator::getLocale(ULocDataLocaleType type, UErrorCode& errorCode) const { in getLocale()
306 if(U_FAILURE(errorCode)) { in getLocale()
316 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in getLocale()
322 RuleBasedCollator::internalGetLocaleID(ULocDataLocaleType type, UErrorCode &errorCode) const { in internalGetLocaleID()
323 if(U_FAILURE(errorCode)) { in internalGetLocaleID()
336 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in internalGetLocaleID()
368 RuleBasedCollator::getTailoredSet(UErrorCode &errorCode) const { in getTailoredSet()
369 if(U_FAILURE(errorCode)) { return nullptr; } in getTailoredSet()
372 errorCode = U_MEMORY_ALLOCATION_ERROR; in getTailoredSet()
376 TailoredSet(tailored).forData(data, errorCode); in getTailoredSet()
377 if(U_FAILURE(errorCode)) { in getTailoredSet()
388 UBool addPrefixes, UErrorCode &errorCode) const { in internalGetContractionsAndExpansions()
389 if(U_FAILURE(errorCode)) { return; } in internalGetContractionsAndExpansions()
396 …ContractionsAndExpansions(contractions, expansions, nullptr, addPrefixes).forData(data, errorCode); in internalGetContractionsAndExpansions()
400 RuleBasedCollator::internalAddContractions(UChar32 c, UnicodeSet &set, UErrorCode &errorCode) const… in internalAddContractions()
401 if(U_FAILURE(errorCode)) { return; } in internalAddContractions()
402 ContractionsAndExpansions(&set, nullptr, nullptr, false).forCodePoint(data, c, errorCode); in internalAddContractions()
411 RuleBasedCollator::getAttribute(UColAttribute attr, UErrorCode &errorCode) const { in getAttribute()
412 if(U_FAILURE(errorCode)) { return UCOL_DEFAULT; } in getAttribute()
437 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in getAttribute()
445 UErrorCode &errorCode) { in setAttribute() argument
446 UColAttributeValue oldValue = getAttribute(attr, errorCode); in setAttribute()
447 if(U_FAILURE(errorCode)) { return; } in setAttribute()
461 errorCode = U_MEMORY_ALLOCATION_ERROR; in setAttribute()
468 defaultSettings.options, errorCode); in setAttribute()
471 ownedSettings->setAlternateHandling(value, defaultSettings.options, errorCode); in setAttribute()
474 ownedSettings->setCaseFirst(value, defaultSettings.options, errorCode); in setAttribute()
478 defaultSettings.options, errorCode); in setAttribute()
482 defaultSettings.options, errorCode); in setAttribute()
485 ownedSettings->setStrength(value, defaultSettings.options, errorCode); in setAttribute()
490 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in setAttribute()
494 … ownedSettings->setFlag(CollationSettings::NUMERIC, value, defaultSettings.options, errorCode); in setAttribute()
497 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in setAttribute()
500 if(U_FAILURE(errorCode)) { return; } in setAttribute()
510 RuleBasedCollator::setMaxVariable(UColReorderCode group, UErrorCode &errorCode) { in setMaxVariable() argument
511 if(U_FAILURE(errorCode)) { return *this; } in setMaxVariable()
519 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in setMaxVariable()
536 errorCode = U_MEMORY_ALLOCATION_ERROR; in setMaxVariable()
546 ownedSettings->setMaxVariable(value, defaultSettings.options, errorCode); in setMaxVariable()
547 if(U_FAILURE(errorCode)) { return *this; } in setMaxVariable()
569 RuleBasedCollator::setVariableTop(const char16_t *varTop, int32_t len, UErrorCode &errorCode) { in setVariableTop() argument
570 if(U_FAILURE(errorCode)) { return 0; } in setVariableTop()
572 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in setVariableTop()
577 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in setVariableTop()
584 ce1 = ci.nextCE(errorCode); in setVariableTop()
585 ce2 = ci.nextCE(errorCode); in setVariableTop()
588 ce1 = ci.nextCE(errorCode); in setVariableTop()
589 ce2 = ci.nextCE(errorCode); in setVariableTop()
592 errorCode = U_CE_NOT_FOUND_ERROR; in setVariableTop()
595 setVariableTop((uint32_t)(ce1 >> 32), errorCode); in setVariableTop()
600 RuleBasedCollator::setVariableTop(const UnicodeString &varTop, UErrorCode &errorCode) { in setVariableTop() argument
601 return setVariableTop(varTop.getBuffer(), varTop.length(), errorCode); in setVariableTop()
605 RuleBasedCollator::setVariableTop(uint32_t varTop, UErrorCode &errorCode) { in setVariableTop() argument
606 if(U_FAILURE(errorCode)) { return; } in setVariableTop()
612 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in setVariableTop()
621 errorCode = U_MEMORY_ALLOCATION_ERROR; in setVariableTop()
625 getDefaultSettings().options, errorCode); in setVariableTop()
626 if(U_FAILURE(errorCode)) { return; } in setVariableTop()
640 UErrorCode &errorCode) const { in getReorderCodes()
641 if(U_FAILURE(errorCode)) { return 0; } in getReorderCodes()
643 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in getReorderCodes()
649 errorCode = U_BUFFER_OVERFLOW_ERROR; in getReorderCodes()
658 UErrorCode &errorCode) { in setReorderCodes() argument
659 if(U_FAILURE(errorCode)) { return; } in setReorderCodes()
661 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in setReorderCodes()
676 errorCode = U_MEMORY_ALLOCATION_ERROR; in setReorderCodes()
679 ownedSettings->copyReorderingFrom(defaultSettings, errorCode); in setReorderCodes()
686 errorCode = U_MEMORY_ALLOCATION_ERROR; in setReorderCodes()
689 ownedSettings->setReordering(*data, reorderCodes, length, errorCode); in setReorderCodes()
702 UErrorCode &errorCode) const { in compare()
703 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; } in compare()
705 right.getBuffer(), right.length(), errorCode); in compare()
710 int32_t length, UErrorCode &errorCode) const { in compare()
711 if(U_FAILURE(errorCode) || length == 0) { return UCOL_EQUAL; } in compare()
713 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in compare()
721 right.getBuffer(), rightLength, errorCode); in compare()
727 UErrorCode &errorCode) const { in compare()
728 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; } in compare()
730 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in compare()
740 return doCompare(left, leftLength, right, rightLength, errorCode); in compare()
745 UErrorCode &errorCode) const { in compareUTF8()
746 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; } in compareUTF8()
750 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in compareUTF8()
753 return doCompare(leftBytes, left.length(), rightBytes, right.length(), errorCode); in compareUTF8()
759 UErrorCode &errorCode) const { in internalCompareUTF8()
760 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; } in internalCompareUTF8()
762 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in internalCompareUTF8()
773 reinterpret_cast<const uint8_t *>(right), rightLength, errorCode); in internalCompareUTF8()
857 UErrorCode errorCode = U_ZERO_ERROR; in FCDUTF16NFDIterator() local
858 const char16_t *spanLimit = nfcImpl.makeFCD(text, textLimit, nullptr, errorCode); in FCDUTF16NFDIterator()
859 if(U_FAILURE(errorCode)) { return; } in FCDUTF16NFDIterator()
867 if(r_buffer.init(str.length(), errorCode)) { in FCDUTF16NFDIterator()
868 nfcImpl.makeFCD(spanLimit, textLimit, &r_buffer, errorCode); in FCDUTF16NFDIterator()
871 if(U_SUCCESS(errorCode)) { in FCDUTF16NFDIterator()
904 UErrorCode errorCode = U_ZERO_ERROR; in nextRawCodePoint() local
905 return u8ci.nextCodePoint(errorCode); in nextRawCodePoint()
928 UErrorCode errorCode = U_ZERO_ERROR; in nextRawCodePoint() local
929 return uici.nextCodePoint(errorCode); in nextRawCodePoint()
971 UErrorCode &errorCode) const { in doCompare()
1055 … result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode); in doCompare()
1061 … result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode); in doCompare()
1064 if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) { in doCompare()
1090 UErrorCode &errorCode) const { in doCompare()
1182 … result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode); in doCompare()
1186 … result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode); in doCompare()
1189 if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) { in doCompare()
1218 UErrorCode &errorCode) const { in compare()
1219 if(U_FAILURE(errorCode) || &left == &right) { return UCOL_EQUAL; } in compare()
1254 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode); in compare()
1258 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode); in compare()
1260 if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) { in compare()
1281 UErrorCode &errorCode) const { in getCollationKey()
1282 return getCollationKey(s.getBuffer(), s.length(), key, errorCode); in getCollationKey()
1287 UErrorCode &errorCode) const { in getCollationKey()
1288 if(U_FAILURE(errorCode)) { in getCollationKey()
1292 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in getCollationKey()
1297 writeSortKey(s, length, sink, errorCode); in getCollationKey()
1298 if(U_FAILURE(errorCode)) { in getCollationKey()
1301 errorCode = U_MEMORY_ALLOCATION_ERROR; in getCollationKey()
1327 UErrorCode errorCode = U_ZERO_ERROR; in getSortKey() local
1328 writeSortKey(s, length, sink, errorCode); in getSortKey()
1329 return U_SUCCESS(errorCode) ? sink.NumberOfBytesAppended() : 0; in getSortKey()
1334 SortKeyByteSink &sink, UErrorCode &errorCode) const { in writeSortKey()
1335 if(U_FAILURE(errorCode)) { return; } in writeSortKey()
1343 callback, true, errorCode); in writeSortKey()
1348 callback, true, errorCode); in writeSortKey()
1351 writeIdenticalLevel(s, limit, sink, errorCode); in writeSortKey()
1359 SortKeyByteSink &sink, UErrorCode &errorCode) const { in writeIdenticalLevel()
1361 const char16_t *nfdQCYesLimit = data->nfcImpl.decompose(s, limit, nullptr, errorCode); in writeIdenticalLevel()
1362 if(U_FAILURE(errorCode)) { return; } in writeIdenticalLevel()
1379 data->nfcImpl.decompose(nfdQCYesLimit, limit, nfd, destLengthEstimate, errorCode); in writeIdenticalLevel()
1425 … uint8_t *dest, int32_t count, UErrorCode &errorCode) const { in internalNextSortKeyPart()
1426 if(U_FAILURE(errorCode)) { return 0; } in internalNextSortKeyPart()
1428 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in internalNextSortKeyPart()
1444 sink, level, callback, false, errorCode); in internalNextSortKeyPart()
1448 sink, level, callback, false, errorCode); in internalNextSortKeyPart()
1450 if(U_FAILURE(errorCode)) { return 0; } in internalNextSortKeyPart()
1473 writeIdenticalLevel(sArray, sArray + s.length(), sink, errorCode); in internalNextSortKeyPart()
1474 if(U_FAILURE(errorCode)) { return 0; } in internalNextSortKeyPart()
1493 UErrorCode &errorCode) const { in internalGetCEs()
1494 if(U_FAILURE(errorCode)) { return; } in internalGetCEs()
1501 while((ce = iter.nextCE(errorCode)) != Collation::NO_CE) { in internalGetCEs()
1502 ces.addElement(ce, errorCode); in internalGetCEs()
1507 while((ce = iter.nextCE(errorCode)) != Collation::NO_CE) { in internalGetCEs()
1508 ces.addElement(ce, errorCode); in internalGetCEs()
1516 UErrorCode &errorCode) { in appendSubtag() argument
1517 if(U_FAILURE(errorCode) || length == 0) { return; } in appendSubtag()
1519 s.append('_', errorCode); in appendSubtag()
1521 s.append(letter, errorCode); in appendSubtag()
1523 s.append(uprv_toupper(subtag[i]), errorCode); in appendSubtag()
1528 UErrorCode &errorCode) { in appendAttribute() argument
1529 if(U_FAILURE(errorCode)) { return; } in appendAttribute()
1531 s.append('_', errorCode); in appendAttribute()
1534 s.append(letter, errorCode); in appendAttribute()
1535 s.append(valueChars[value], errorCode); in appendAttribute()
1543 UErrorCode &errorCode) const { in internalGetShortDefinitionString()
1544 if(U_FAILURE(errorCode)) { return 0; } in internalGetShortDefinitionString()
1546 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in internalGetShortDefinitionString()
1550 locale = internalGetLocaleID(ULOC_VALID_LOCALE, errorCode); in internalGetShortDefinitionString()
1556 nullptr, &errorCode); in internalGetShortDefinitionString()
1557 if(U_FAILURE(errorCode)) { return 0; } in internalGetShortDefinitionString()
1565 appendAttribute(result, 'A', getAttribute(UCOL_ALTERNATE_HANDLING, errorCode), errorCode); in internalGetShortDefinitionString()
1570 appendAttribute(result, 'C', getAttribute(UCOL_CASE_FIRST, errorCode), errorCode); in internalGetShortDefinitionString()
1573 appendAttribute(result, 'D', getAttribute(UCOL_NUMERIC_COLLATION, errorCode), errorCode); in internalGetShortDefinitionString()
1576 appendAttribute(result, 'E', getAttribute(UCOL_CASE_LEVEL, errorCode), errorCode); in internalGetShortDefinitionString()
1579 appendAttribute(result, 'F', getAttribute(UCOL_FRENCH_COLLATION, errorCode), errorCode); in internalGetShortDefinitionString()
1582 …ength = uloc_getKeywordValue(resultLocale, "collation", subtag, UPRV_LENGTHOF(subtag), &errorCode); in internalGetShortDefinitionString()
1583 appendSubtag(result, 'K', subtag, length, errorCode); in internalGetShortDefinitionString()
1584 length = uloc_getLanguage(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); in internalGetShortDefinitionString()
1586 appendSubtag(result, 'L', "root", 4, errorCode); in internalGetShortDefinitionString()
1588 appendSubtag(result, 'L', subtag, length, errorCode); in internalGetShortDefinitionString()
1591 appendAttribute(result, 'N', getAttribute(UCOL_NORMALIZATION_MODE, errorCode), errorCode); in internalGetShortDefinitionString()
1593 length = uloc_getCountry(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); in internalGetShortDefinitionString()
1594 appendSubtag(result, 'R', subtag, length, errorCode); in internalGetShortDefinitionString()
1596 appendAttribute(result, 'S', getAttribute(UCOL_STRENGTH, errorCode), errorCode); in internalGetShortDefinitionString()
1598 length = uloc_getVariant(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); in internalGetShortDefinitionString()
1599 appendSubtag(result, 'V', subtag, length, errorCode); in internalGetShortDefinitionString()
1600 length = uloc_getScript(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); in internalGetShortDefinitionString()
1601 appendSubtag(result, 'Z', subtag, length, errorCode); in internalGetShortDefinitionString()
1603 if(U_FAILURE(errorCode)) { return 0; } in internalGetShortDefinitionString()
1604 return result.extract(buffer, capacity, errorCode); in internalGetShortDefinitionString()
1613 RuleBasedCollator::computeMaxExpansions(const CollationTailoring *t, UErrorCode &errorCode) { in computeMaxExpansions() argument
1614 t->maxExpansions = CollationElementIterator::computeMaxExpansions(t->data, errorCode); in computeMaxExpansions()
1618 RuleBasedCollator::initMaxExpansions(UErrorCode &errorCode) const { in initMaxExpansions()
1619 umtx_initOnce(tailoring->maxExpansionsInitOnce, computeMaxExpansions, tailoring, errorCode); in initMaxExpansions()
1620 return U_SUCCESS(errorCode); in initMaxExpansions()
1625 UErrorCode errorCode = U_ZERO_ERROR; in createCollationElementIterator() local
1626 if(!initMaxExpansions(errorCode)) { return nullptr; } in createCollationElementIterator()
1627 CollationElementIterator *cei = new CollationElementIterator(source, this, errorCode); in createCollationElementIterator()
1628 if(U_FAILURE(errorCode)) { in createCollationElementIterator()
1637 UErrorCode errorCode = U_ZERO_ERROR; in createCollationElementIterator() local
1638 if(!initMaxExpansions(errorCode)) { return nullptr; } in createCollationElementIterator()
1639 CollationElementIterator *cei = new CollationElementIterator(source, this, errorCode); in createCollationElementIterator()
1640 if(U_FAILURE(errorCode)) { in createCollationElementIterator()
1649 UErrorCode errorCode = U_ZERO_ERROR; in getMaxExpansion() local
1650 (void)initMaxExpansions(errorCode); in getMaxExpansion()