Lines Matching defs:errorCode
153 const RuleBasedCollator *base, UErrorCode &errorCode)
160 if(U_FAILURE(errorCode)) { return; }
162 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
165 const CollationTailoring *root = CollationRoot::getRoot(errorCode);
166 if(U_FAILURE(errorCode)) { return; }
168 errorCode = U_UNSUPPORTED_ERROR;
173 errorCode = U_MEMORY_ALLOCATION_ERROR;
176 CollationDataReader::read(base->tailoring, bin, length, *t, errorCode);
177 if(U_FAILURE(errorCode)) { return; }
247 UErrorCode errorCode = U_ZERO_ERROR;
248 LocalPointer<UnicodeSet> thisTailored(getTailoredSet(errorCode));
249 LocalPointer<UnicodeSet> otherTailored(o.getTailoredSet(errorCode));
250 if(U_FAILURE(errorCode)) { return FALSE; }
265 UErrorCode errorCode = U_ZERO_ERROR;
266 LocalPointer<UnicodeSet> set(getTailoredSet(errorCode));
267 if(U_FAILURE(errorCode)) { return 0; }
291 RuleBasedCollator::getLocale(ULocDataLocaleType type, UErrorCode& errorCode) const {
292 if(U_FAILURE(errorCode)) {
302 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
308 RuleBasedCollator::internalGetLocaleID(ULocDataLocaleType type, UErrorCode &errorCode) const {
309 if(U_FAILURE(errorCode)) {
322 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
354 RuleBasedCollator::getTailoredSet(UErrorCode &errorCode) const {
355 if(U_FAILURE(errorCode)) { return NULL; }
358 errorCode = U_MEMORY_ALLOCATION_ERROR;
362 TailoredSet(tailored).forData(data, errorCode);
363 if(U_FAILURE(errorCode)) {
374 UBool addPrefixes, UErrorCode &errorCode) const {
375 if(U_FAILURE(errorCode)) { return; }
382 ContractionsAndExpansions(contractions, expansions, NULL, addPrefixes).forData(data, errorCode);
386 RuleBasedCollator::internalAddContractions(UChar32 c, UnicodeSet &set, UErrorCode &errorCode) const {
387 if(U_FAILURE(errorCode)) { return; }
388 ContractionsAndExpansions(&set, NULL, NULL, FALSE).forCodePoint(data, c, errorCode);
397 RuleBasedCollator::getAttribute(UColAttribute attr, UErrorCode &errorCode) const {
398 if(U_FAILURE(errorCode)) { return UCOL_DEFAULT; }
423 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
431 UErrorCode &errorCode) {
432 UColAttributeValue oldValue = getAttribute(attr, errorCode);
433 if(U_FAILURE(errorCode)) { return; }
447 errorCode = U_MEMORY_ALLOCATION_ERROR;
454 defaultSettings.options, errorCode);
457 ownedSettings->setAlternateHandling(value, defaultSettings.options, errorCode);
460 ownedSettings->setCaseFirst(value, defaultSettings.options, errorCode);
464 defaultSettings.options, errorCode);
468 defaultSettings.options, errorCode);
471 ownedSettings->setStrength(value, defaultSettings.options, errorCode);
476 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
480 ownedSettings->setFlag(CollationSettings::NUMERIC, value, defaultSettings.options, errorCode);
483 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
486 if(U_FAILURE(errorCode)) { return; }
496 RuleBasedCollator::setMaxVariable(UColReorderCode group, UErrorCode &errorCode) {
497 if(U_FAILURE(errorCode)) { return *this; }
505 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
522 errorCode = U_MEMORY_ALLOCATION_ERROR;
531 ownedSettings->setMaxVariable(value, defaultSettings.options, errorCode);
532 if(U_FAILURE(errorCode)) { return *this; }
549 RuleBasedCollator::getVariableTop(UErrorCode & /*errorCode*/) const {
554 RuleBasedCollator::setVariableTop(const UChar *varTop, int32_t len, UErrorCode &errorCode) {
555 if(U_FAILURE(errorCode)) { return 0; }
557 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
562 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
569 ce1 = ci.nextCE(errorCode);
570 ce2 = ci.nextCE(errorCode);
573 ce1 = ci.nextCE(errorCode);
574 ce2 = ci.nextCE(errorCode);
577 errorCode = U_CE_NOT_FOUND_ERROR;
580 setVariableTop((uint32_t)(ce1 >> 32), errorCode);
585 RuleBasedCollator::setVariableTop(const UnicodeString &varTop, UErrorCode &errorCode) {
586 return setVariableTop(varTop.getBuffer(), varTop.length(), errorCode);
590 RuleBasedCollator::setVariableTop(uint32_t varTop, UErrorCode &errorCode) {
591 if(U_FAILURE(errorCode)) { return; }
597 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
606 errorCode = U_MEMORY_ALLOCATION_ERROR;
610 getDefaultSettings().options, errorCode);
611 if(U_FAILURE(errorCode)) { return; }
625 UErrorCode &errorCode) const {
626 if(U_FAILURE(errorCode)) { return 0; }
628 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
634 errorCode = U_BUFFER_OVERFLOW_ERROR;
643 UErrorCode &errorCode) {
644 if(U_FAILURE(errorCode)) { return; }
646 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
658 errorCode = U_MEMORY_ALLOCATION_ERROR;
670 errorCode = U_MEMORY_ALLOCATION_ERROR;
677 data->makeReorderTable(reorderCodes, length, reorderTable, errorCode);
678 if(U_FAILURE(errorCode)) { return; }
680 errorCode = U_MEMORY_ALLOCATION_ERROR;
696 UErrorCode &errorCode) const {
697 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; }
699 right.getBuffer(), right.length(), errorCode);
704 int32_t length, UErrorCode &errorCode) const {
705 if(U_FAILURE(errorCode) || length == 0) { return UCOL_EQUAL; }
707 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
715 right.getBuffer(), rightLength, errorCode);
721 UErrorCode &errorCode) const {
722 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; }
724 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
734 return doCompare(left, leftLength, right, rightLength, errorCode);
739 UErrorCode &errorCode) const {
740 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; }
744 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
747 return doCompare(leftBytes, left.length(), rightBytes, right.length(), errorCode);
753 UErrorCode &errorCode) const {
754 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; }
756 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
767 reinterpret_cast<const uint8_t *>(right), rightLength, errorCode);
851 UErrorCode errorCode = U_ZERO_ERROR;
852 const UChar *spanLimit = nfcImpl.makeFCD(text, textLimit, NULL, errorCode);
853 if(U_FAILURE(errorCode)) { return; }
861 if(buffer.init(str.length(), errorCode)) {
862 nfcImpl.makeFCD(spanLimit, textLimit, &buffer, errorCode);
865 if(U_SUCCESS(errorCode)) {
898 UErrorCode errorCode = U_ZERO_ERROR;
899 return u8ci.nextCodePoint(errorCode);
922 UErrorCode errorCode = U_ZERO_ERROR;
923 return uici.nextCodePoint(errorCode);
965 errorCode) const {
966 // U_FAILURE(errorCode) checked by caller.
1049 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode);
1055 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode);
1058 if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) {
1084 UErrorCode &errorCode) const {
1085 // U_FAILURE(errorCode) checked by caller.
1176 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode);
1180 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode);
1183 if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) {
1212 UErrorCode &errorCode) const {
1213 if(U_FAILURE(errorCode) || &left == &right) { return UCOL_EQUAL; }
1248 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode);
1252 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode);
1254 if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) {
1275 UErrorCode &errorCode) const {
1276 return getCollationKey(s.getBuffer(), s.length(), key, errorCode);
1281 UErrorCode &errorCode) const {
1282 if(U_FAILURE(errorCode)) {
1286 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
1291 writeSortKey(s, length, sink, errorCode);
1292 if(U_FAILURE(errorCode)) {
1295 errorCode = U_MEMORY_ALLOCATION_ERROR;
1321 UErrorCode errorCode = U_ZERO_ERROR;
1322 writeSortKey(s, length, sink, errorCode);
1323 return U_SUCCESS(errorCode) ? sink.NumberOfBytesAppended() : 0;
1328 SortKeyByteSink &sink, UErrorCode &errorCode) const {
1329 if(U_FAILURE(errorCode)) { return; }
1337 callback, TRUE, errorCode);
1342 callback, TRUE, errorCode);
1345 writeIdenticalLevel(s, limit, sink, errorCode);
1353 SortKeyByteSink &sink, UErrorCode &errorCode) const {
1355 const UChar *nfdQCYesLimit = data->nfcImpl.decompose(s, limit, NULL, errorCode);
1356 if(U_FAILURE(errorCode)) { return; }
1373 data->nfcImpl.decompose(nfdQCYesLimit, limit, nfd, destLengthEstimate, errorCode);
1419 uint8_t *dest, int32_t count, UErrorCode &errorCode) const {
1420 if(U_FAILURE(errorCode)) { return 0; }
1422 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
1438 sink, level, callback, FALSE, errorCode);
1442 sink, level, callback, FALSE, errorCode);
1444 if(U_FAILURE(errorCode)) { return 0; }
1467 writeIdenticalLevel(sArray, sArray + s.length(), sink, errorCode);
1468 if(U_FAILURE(errorCode)) { return 0; }
1487 UErrorCode &errorCode) const {
1488 if(U_FAILURE(errorCode)) { return; }
1495 while((ce = iter.nextCE(errorCode)) != Collation::NO_CE) {
1496 ces.addElement(ce, errorCode);
1501 while((ce = iter.nextCE(errorCode)) != Collation::NO_CE) {
1502 ces.addElement(ce, errorCode);
1510 UErrorCode &errorCode) {
1511 if(U_FAILURE(errorCode) || length == 0) { return; }
1513 s.append('_', errorCode);
1515 s.append(letter, errorCode);
1517 s.append(uprv_toupper(subtag[i]), errorCode);
1522 UErrorCode &errorCode) {
1523 if(U_FAILURE(errorCode)) { return; }
1525 s.append('_', errorCode);
1528 s.append(letter, errorCode);
1529 s.append(valueChars[value], errorCode);
1537 UErrorCode &errorCode) const {
1538 if(U_FAILURE(errorCode)) { return 0; }
1540 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
1544 locale = internalGetLocaleID(ULOC_VALID_LOCALE, errorCode);
1550 NULL, &errorCode);
1551 if(U_FAILURE(errorCode)) { return 0; }
1563 appendAttribute(result, 'A', getAttribute(UCOL_ALTERNATE_HANDLING, errorCode), errorCode);
1568 appendAttribute(result, 'C', getAttribute(UCOL_CASE_FIRST, errorCode), errorCode);
1571 appendAttribute(result, 'D', getAttribute(UCOL_NUMERIC_COLLATION, errorCode), errorCode);
1574 appendAttribute(result, 'E', getAttribute(UCOL_CASE_LEVEL, errorCode), errorCode);
1577 appendAttribute(result, 'F', getAttribute(UCOL_FRENCH_COLLATION, errorCode), errorCode);
1580 length = uloc_getKeywordValue(resultLocale, "collation", subtag, LENGTHOF(subtag), &errorCode);
1581 appendSubtag(result, 'K', subtag, length, errorCode);
1582 length = uloc_getLanguage(resultLocale, subtag, LENGTHOF(subtag), &errorCode);
1583 appendSubtag(result, 'L', subtag, length, errorCode);
1585 appendAttribute(result, 'N', getAttribute(UCOL_NORMALIZATION_MODE, errorCode), errorCode);
1587 length = uloc_getCountry(resultLocale, subtag, LENGTHOF(subtag), &errorCode);
1588 appendSubtag(result, 'R', subtag, length, errorCode);
1590 appendAttribute(result, 'S', getAttribute(UCOL_STRENGTH, errorCode), errorCode);
1592 length = uloc_getVariant(resultLocale, subtag, LENGTHOF(subtag), &errorCode);
1593 appendSubtag(result, 'V', subtag, length, errorCode);
1594 length = uloc_getScript(resultLocale, subtag, LENGTHOF(subtag), &errorCode);
1595 appendSubtag(result, 'Z', subtag, length, errorCode);
1597 if(U_FAILURE(errorCode)) { return 0; }
1601 return u_terminateChars(buffer, capacity, result.length(), &errorCode);
1610 RuleBasedCollator::computeMaxExpansions(const CollationTailoring *t, UErrorCode &errorCode) {
1611 t->maxExpansions = CollationElementIterator::computeMaxExpansions(t->data, errorCode);
1615 RuleBasedCollator::initMaxExpansions(UErrorCode &errorCode) const {
1616 umtx_initOnce(tailoring->maxExpansionsInitOnce, computeMaxExpansions, tailoring, errorCode);
1617 return U_SUCCESS(errorCode);
1622 UErrorCode errorCode = U_ZERO_ERROR;
1623 if(!initMaxExpansions(errorCode)) { return NULL; }
1624 CollationElementIterator *cei = new CollationElementIterator(source, this, errorCode);
1625 if(U_FAILURE(errorCode)) {
1634 UErrorCode errorCode = U_ZERO_ERROR;
1635 if(!initMaxExpansions(errorCode)) { return NULL; }
1636 CollationElementIterator *cei = new CollationElementIterator(source, this, errorCode);
1637 if(U_FAILURE(errorCode)) {
1646 UErrorCode errorCode = U_ZERO_ERROR;
1647 (void)initMaxExpansions(errorCode);