• 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 NULL; } 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, NULL, 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, NULL, NULL, 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()
545 ownedSettings->setMaxVariable(value, defaultSettings.options, errorCode); in setMaxVariable()
546 if(U_FAILURE(errorCode)) { return *this; } in setMaxVariable()
568 RuleBasedCollator::setVariableTop(const UChar *varTop, int32_t len, UErrorCode &errorCode) { in setVariableTop() argument
569 if(U_FAILURE(errorCode)) { return 0; } in setVariableTop()
571 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in setVariableTop()
576 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in setVariableTop()
583 ce1 = ci.nextCE(errorCode); in setVariableTop()
584 ce2 = ci.nextCE(errorCode); in setVariableTop()
587 ce1 = ci.nextCE(errorCode); in setVariableTop()
588 ce2 = ci.nextCE(errorCode); in setVariableTop()
591 errorCode = U_CE_NOT_FOUND_ERROR; in setVariableTop()
594 setVariableTop((uint32_t)(ce1 >> 32), errorCode); in setVariableTop()
599 RuleBasedCollator::setVariableTop(const UnicodeString &varTop, UErrorCode &errorCode) { in setVariableTop() argument
600 return setVariableTop(varTop.getBuffer(), varTop.length(), errorCode); in setVariableTop()
604 RuleBasedCollator::setVariableTop(uint32_t varTop, UErrorCode &errorCode) { in setVariableTop() argument
605 if(U_FAILURE(errorCode)) { return; } in setVariableTop()
611 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in setVariableTop()
620 errorCode = U_MEMORY_ALLOCATION_ERROR; in setVariableTop()
624 getDefaultSettings().options, errorCode); in setVariableTop()
625 if(U_FAILURE(errorCode)) { return; } in setVariableTop()
639 UErrorCode &errorCode) const { in getReorderCodes()
640 if(U_FAILURE(errorCode)) { return 0; } in getReorderCodes()
642 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in getReorderCodes()
648 errorCode = U_BUFFER_OVERFLOW_ERROR; in getReorderCodes()
657 UErrorCode &errorCode) { in setReorderCodes() argument
658 if(U_FAILURE(errorCode)) { return; } in setReorderCodes()
660 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in setReorderCodes()
675 errorCode = U_MEMORY_ALLOCATION_ERROR; in setReorderCodes()
678 ownedSettings->copyReorderingFrom(defaultSettings, errorCode); in setReorderCodes()
685 errorCode = U_MEMORY_ALLOCATION_ERROR; in setReorderCodes()
688 ownedSettings->setReordering(*data, reorderCodes, length, errorCode); in setReorderCodes()
701 UErrorCode &errorCode) const { in compare()
702 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; } in compare()
704 right.getBuffer(), right.length(), errorCode); in compare()
709 int32_t length, UErrorCode &errorCode) const { in compare()
710 if(U_FAILURE(errorCode) || length == 0) { return UCOL_EQUAL; } in compare()
712 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in compare()
720 right.getBuffer(), rightLength, errorCode); in compare()
726 UErrorCode &errorCode) const { in compare()
727 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; } in compare()
729 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in compare()
739 return doCompare(left, leftLength, right, rightLength, errorCode); in compare()
744 UErrorCode &errorCode) const { in compareUTF8()
745 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; } in compareUTF8()
749 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in compareUTF8()
752 return doCompare(leftBytes, left.length(), rightBytes, right.length(), errorCode); in compareUTF8()
758 UErrorCode &errorCode) const { in internalCompareUTF8()
759 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; } in internalCompareUTF8()
761 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in internalCompareUTF8()
772 reinterpret_cast<const uint8_t *>(right), rightLength, errorCode); in internalCompareUTF8()
856 UErrorCode errorCode = U_ZERO_ERROR; in FCDUTF16NFDIterator() local
857 const UChar *spanLimit = nfcImpl.makeFCD(text, textLimit, NULL, errorCode); in FCDUTF16NFDIterator()
858 if(U_FAILURE(errorCode)) { return; } in FCDUTF16NFDIterator()
866 if(r_buffer.init(str.length(), errorCode)) { in FCDUTF16NFDIterator()
867 nfcImpl.makeFCD(spanLimit, textLimit, &r_buffer, errorCode); in FCDUTF16NFDIterator()
870 if(U_SUCCESS(errorCode)) { in FCDUTF16NFDIterator()
903 UErrorCode errorCode = U_ZERO_ERROR; in nextRawCodePoint() local
904 return u8ci.nextCodePoint(errorCode); in nextRawCodePoint()
927 UErrorCode errorCode = U_ZERO_ERROR; in nextRawCodePoint() local
928 return uici.nextCodePoint(errorCode); in nextRawCodePoint()
970 UErrorCode &errorCode) const { in doCompare()
1054 … result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode); in doCompare()
1060 … result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode); in doCompare()
1063 if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) { in doCompare()
1089 UErrorCode &errorCode) const { in doCompare()
1181 … result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode); in doCompare()
1185 … result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode); in doCompare()
1188 if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) { in doCompare()
1217 UErrorCode &errorCode) const { in compare()
1218 if(U_FAILURE(errorCode) || &left == &right) { return UCOL_EQUAL; } in compare()
1253 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode); in compare()
1257 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode); in compare()
1259 if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) { in compare()
1280 UErrorCode &errorCode) const { in getCollationKey()
1281 return getCollationKey(s.getBuffer(), s.length(), key, errorCode); in getCollationKey()
1286 UErrorCode &errorCode) const { in getCollationKey()
1287 if(U_FAILURE(errorCode)) { in getCollationKey()
1291 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in getCollationKey()
1296 writeSortKey(s, length, sink, errorCode); in getCollationKey()
1297 if(U_FAILURE(errorCode)) { in getCollationKey()
1300 errorCode = U_MEMORY_ALLOCATION_ERROR; in getCollationKey()
1326 UErrorCode errorCode = U_ZERO_ERROR; in getSortKey() local
1327 writeSortKey(s, length, sink, errorCode); in getSortKey()
1328 return U_SUCCESS(errorCode) ? sink.NumberOfBytesAppended() : 0; in getSortKey()
1333 SortKeyByteSink &sink, UErrorCode &errorCode) const { in writeSortKey()
1334 if(U_FAILURE(errorCode)) { return; } in writeSortKey()
1342 callback, TRUE, errorCode); in writeSortKey()
1347 callback, TRUE, errorCode); in writeSortKey()
1350 writeIdenticalLevel(s, limit, sink, errorCode); in writeSortKey()
1358 SortKeyByteSink &sink, UErrorCode &errorCode) const { in writeIdenticalLevel()
1360 const UChar *nfdQCYesLimit = data->nfcImpl.decompose(s, limit, NULL, errorCode); in writeIdenticalLevel()
1361 if(U_FAILURE(errorCode)) { return; } in writeIdenticalLevel()
1378 data->nfcImpl.decompose(nfdQCYesLimit, limit, nfd, destLengthEstimate, errorCode); in writeIdenticalLevel()
1424 … uint8_t *dest, int32_t count, UErrorCode &errorCode) const { in internalNextSortKeyPart()
1425 if(U_FAILURE(errorCode)) { return 0; } in internalNextSortKeyPart()
1427 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in internalNextSortKeyPart()
1443 sink, level, callback, FALSE, errorCode); in internalNextSortKeyPart()
1447 sink, level, callback, FALSE, errorCode); in internalNextSortKeyPart()
1449 if(U_FAILURE(errorCode)) { return 0; } in internalNextSortKeyPart()
1472 writeIdenticalLevel(sArray, sArray + s.length(), sink, errorCode); in internalNextSortKeyPart()
1473 if(U_FAILURE(errorCode)) { return 0; } in internalNextSortKeyPart()
1492 UErrorCode &errorCode) const { in internalGetCEs()
1493 if(U_FAILURE(errorCode)) { return; } in internalGetCEs()
1500 while((ce = iter.nextCE(errorCode)) != Collation::NO_CE) { in internalGetCEs()
1501 ces.addElement(ce, errorCode); in internalGetCEs()
1506 while((ce = iter.nextCE(errorCode)) != Collation::NO_CE) { in internalGetCEs()
1507 ces.addElement(ce, errorCode); in internalGetCEs()
1515 UErrorCode &errorCode) { in appendSubtag() argument
1516 if(U_FAILURE(errorCode) || length == 0) { return; } in appendSubtag()
1518 s.append('_', errorCode); in appendSubtag()
1520 s.append(letter, errorCode); in appendSubtag()
1522 s.append(uprv_toupper(subtag[i]), errorCode); in appendSubtag()
1527 UErrorCode &errorCode) { in appendAttribute() argument
1528 if(U_FAILURE(errorCode)) { return; } in appendAttribute()
1530 s.append('_', errorCode); in appendAttribute()
1533 s.append(letter, errorCode); in appendAttribute()
1534 s.append(valueChars[value], errorCode); in appendAttribute()
1542 UErrorCode &errorCode) const { in internalGetShortDefinitionString()
1543 if(U_FAILURE(errorCode)) { return 0; } in internalGetShortDefinitionString()
1545 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in internalGetShortDefinitionString()
1549 locale = internalGetLocaleID(ULOC_VALID_LOCALE, errorCode); in internalGetShortDefinitionString()
1555 NULL, &errorCode); in internalGetShortDefinitionString()
1556 if(U_FAILURE(errorCode)) { return 0; } in internalGetShortDefinitionString()
1564 appendAttribute(result, 'A', getAttribute(UCOL_ALTERNATE_HANDLING, errorCode), errorCode); in internalGetShortDefinitionString()
1569 appendAttribute(result, 'C', getAttribute(UCOL_CASE_FIRST, errorCode), errorCode); in internalGetShortDefinitionString()
1572 appendAttribute(result, 'D', getAttribute(UCOL_NUMERIC_COLLATION, errorCode), errorCode); in internalGetShortDefinitionString()
1575 appendAttribute(result, 'E', getAttribute(UCOL_CASE_LEVEL, errorCode), errorCode); in internalGetShortDefinitionString()
1578 appendAttribute(result, 'F', getAttribute(UCOL_FRENCH_COLLATION, errorCode), errorCode); in internalGetShortDefinitionString()
1581 …ength = uloc_getKeywordValue(resultLocale, "collation", subtag, UPRV_LENGTHOF(subtag), &errorCode); in internalGetShortDefinitionString()
1582 appendSubtag(result, 'K', subtag, length, errorCode); in internalGetShortDefinitionString()
1583 length = uloc_getLanguage(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); in internalGetShortDefinitionString()
1585 appendSubtag(result, 'L', "root", 4, errorCode); in internalGetShortDefinitionString()
1587 appendSubtag(result, 'L', subtag, length, errorCode); in internalGetShortDefinitionString()
1590 appendAttribute(result, 'N', getAttribute(UCOL_NORMALIZATION_MODE, errorCode), errorCode); in internalGetShortDefinitionString()
1592 length = uloc_getCountry(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); in internalGetShortDefinitionString()
1593 appendSubtag(result, 'R', subtag, length, errorCode); in internalGetShortDefinitionString()
1595 appendAttribute(result, 'S', getAttribute(UCOL_STRENGTH, errorCode), errorCode); in internalGetShortDefinitionString()
1597 length = uloc_getVariant(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); in internalGetShortDefinitionString()
1598 appendSubtag(result, 'V', subtag, length, errorCode); in internalGetShortDefinitionString()
1599 length = uloc_getScript(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); in internalGetShortDefinitionString()
1600 appendSubtag(result, 'Z', subtag, length, errorCode); in internalGetShortDefinitionString()
1602 if(U_FAILURE(errorCode)) { return 0; } in internalGetShortDefinitionString()
1603 return result.extract(buffer, capacity, errorCode); in internalGetShortDefinitionString()
1612 RuleBasedCollator::computeMaxExpansions(const CollationTailoring *t, UErrorCode &errorCode) { in computeMaxExpansions() argument
1613 t->maxExpansions = CollationElementIterator::computeMaxExpansions(t->data, errorCode); in computeMaxExpansions()
1617 RuleBasedCollator::initMaxExpansions(UErrorCode &errorCode) const { in initMaxExpansions()
1618 umtx_initOnce(tailoring->maxExpansionsInitOnce, computeMaxExpansions, tailoring, errorCode); in initMaxExpansions()
1619 return U_SUCCESS(errorCode); in initMaxExpansions()
1624 UErrorCode errorCode = U_ZERO_ERROR; in createCollationElementIterator() local
1625 if(!initMaxExpansions(errorCode)) { return NULL; } in createCollationElementIterator()
1626 CollationElementIterator *cei = new CollationElementIterator(source, this, errorCode); in createCollationElementIterator()
1627 if(U_FAILURE(errorCode)) { in createCollationElementIterator()
1636 UErrorCode errorCode = U_ZERO_ERROR; in createCollationElementIterator() local
1637 if(!initMaxExpansions(errorCode)) { return NULL; } in createCollationElementIterator()
1638 CollationElementIterator *cei = new CollationElementIterator(source, this, errorCode); in createCollationElementIterator()
1639 if(U_FAILURE(errorCode)) { in createCollationElementIterator()
1648 UErrorCode errorCode = U_ZERO_ERROR; in getMaxExpansion() local
1649 (void)initMaxExpansions(errorCode); in getMaxExpansion()