Lines Matching refs:errorCode
96 UErrorCode &errorCode);
97 UBool ensureCapacityForOneMore(int32_t oldLength, UErrorCode &errorCode);
113 UErrorCode &errorCode) {
114 if(U_SUCCESS(errorCode) && length>0) {
116 errorCode=U_MEMORY_ALLOCATION_ERROR;
125 MessagePatternList<T, stackCapacity>::ensureCapacityForOneMore(int32_t oldLength, UErrorCode &errorCode) {
126 if(U_FAILURE(errorCode)) {
132 errorCode=U_MEMORY_ALLOCATION_ERROR;
146 MessagePattern::MessagePattern(UErrorCode &errorCode)
151 init(errorCode);
154 MessagePattern::MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &errorCode)
159 init(errorCode);
162 MessagePattern::MessagePattern(const UnicodeString &pattern, UParseError *parseError, UErrorCode &errorCode)
167 if(init(errorCode)) {
168 parse(pattern, parseError, errorCode);
173 MessagePattern::init(UErrorCode &errorCode) {
174 if(U_FAILURE(errorCode)) {
179 errorCode=U_MEMORY_ALLOCATION_ERROR;
192 UErrorCode errorCode=U_ZERO_ERROR;
193 if(!copyStorage(other, errorCode)) {
208 UErrorCode errorCode=U_ZERO_ERROR;
209 if(!copyStorage(other, errorCode)) {
216 MessagePattern::copyStorage(const MessagePattern &other, UErrorCode &errorCode) {
217 if(U_FAILURE(errorCode)) {
227 errorCode=U_MEMORY_ALLOCATION_ERROR;
233 partsList->copyFrom(*other.partsList, other.partsLength, errorCode);
234 if(U_FAILURE(errorCode)) {
244 errorCode=U_MEMORY_ALLOCATION_ERROR;
250 *other.numericValuesList, other.numericValuesLength, errorCode);
251 if(U_FAILURE(errorCode)) {
268 MessagePattern::parse(const UnicodeString &pattern, UParseError *parseError, UErrorCode &errorCode) {
269 preParse(pattern, parseError, errorCode);
270 parseMessage(0, 0, 0, UMSGPAT_ARG_TYPE_NONE, parseError, errorCode);
277 UParseError *parseError, UErrorCode &errorCode) {
278 preParse(pattern, parseError, errorCode);
279 parseChoiceStyle(0, 0, parseError, errorCode);
286 UParseError *parseError, UErrorCode &errorCode) {
287 preParse(pattern, parseError, errorCode);
288 parsePluralOrSelectStyle(UMSGPAT_ARG_TYPE_PLURAL, 0, 0, parseError, errorCode);
295 UParseError *parseError, UErrorCode &errorCode) {
296 preParse(pattern, parseError, errorCode);
297 parsePluralOrSelectStyle(UMSGPAT_ARG_TYPE_SELECT, 0, 0, parseError, errorCode);
406 MessagePattern::preParse(const UnicodeString &pattern, UParseError *parseError, UErrorCode &errorCode) {
407 if(U_FAILURE(errorCode)) {
436 UParseError *parseError, UErrorCode &errorCode) {
437 if(U_FAILURE(errorCode)) {
441 errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
445 addPart(UMSGPAT_PART_TYPE_MSG_START, index, msgStartLength, nestingLevel, errorCode);
447 for(;;) { // while(index<msg.length()) with U_FAILURE(errorCode) check
448 if(U_FAILURE(errorCode)) {
460 u_apos, errorCode); // value=char to be inserted
466 addPart(UMSGPAT_PART_TYPE_SKIP_SYNTAX, index++, 1, 0, errorCode);
474 addPart(UMSGPAT_PART_TYPE_SKIP_SYNTAX, index-1, 1, 0, errorCode);
482 addPart(UMSGPAT_PART_TYPE_SKIP_SYNTAX, ++index, 1, 0, errorCode);
485 addPart(UMSGPAT_PART_TYPE_SKIP_SYNTAX, index++, 1, 0, errorCode);
493 u_apos, errorCode); // value=char to be inserted
502 u_apos, errorCode); // value=char to be inserted
509 addPart(UMSGPAT_PART_TYPE_REPLACE_NUMBER, index-1, 1, 0, errorCode);
511 index=parseArg(index-1, 1, nestingLevel, parseError, errorCode);
519 nestingLevel, errorCode);
531 errorCode=U_UNMATCHED_BRACES;
534 addLimitPart(msgStart, UMSGPAT_PART_TYPE_MSG_LIMIT, index, 0, nestingLevel, errorCode);
540 UParseError *parseError, UErrorCode &errorCode) {
543 addPart(UMSGPAT_PART_TYPE_ARG_START, index, argStartLength, argType, errorCode);
544 if(U_FAILURE(errorCode)) {
550 errorCode=U_UNMATCHED_BRACES;
560 errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
564 addPart(UMSGPAT_PART_TYPE_ARG_NUMBER, nameIndex, length, number, errorCode);
569 errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
573 addPart(UMSGPAT_PART_TYPE_ARG_NAME, nameIndex, length, 0, errorCode);
576 errorCode=U_PATTERN_SYNTAX_ERROR;
582 errorCode=U_UNMATCHED_BRACES;
590 errorCode=U_PATTERN_SYNTAX_ERROR;
602 errorCode=U_UNMATCHED_BRACES;
607 errorCode=U_PATTERN_SYNTAX_ERROR;
612 errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
633 addPart(UMSGPAT_PART_TYPE_ARG_TYPE, typeIndex, length, 0, errorCode);
639 errorCode=U_PATTERN_SYNTAX_ERROR;
645 index=parseSimpleStyle(index, parseError, errorCode);
647 index=parseChoiceStyle(index, nestingLevel, parseError, errorCode);
649 index=parsePluralOrSelectStyle(argType, index, nestingLevel, parseError, errorCode);
654 addLimitPart(argStart, UMSGPAT_PART_TYPE_ARG_LIMIT, index, 1, argType, errorCode);
659 MessagePattern::parseSimpleStyle(int32_t index, UParseError *parseError, UErrorCode &errorCode) {
660 if(U_FAILURE(errorCode)) {
674 errorCode=U_PATTERN_SYNTAX_ERROR;
688 errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
691 addPart(UMSGPAT_PART_TYPE_ARG_STYLE, start, length, 0, errorCode);
697 errorCode=U_UNMATCHED_BRACES;
703 UParseError *parseError, UErrorCode &errorCode) {
704 if(U_FAILURE(errorCode)) {
711 errorCode=U_PATTERN_SYNTAX_ERROR;
722 errorCode=U_PATTERN_SYNTAX_ERROR;
727 errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
730 parseDouble(numberIndex, index, TRUE, parseError, errorCode); // adds ARG_INT or ARG_DOUBLE
731 if(U_FAILURE(errorCode)) {
738 errorCode=U_PATTERN_SYNTAX_ERROR;
744 errorCode=U_PATTERN_SYNTAX_ERROR;
747 addPart(UMSGPAT_PART_TYPE_ARG_SELECTOR, index, 1, 0, errorCode);
749 index=parseMessage(++index, 0, nestingLevel+1, UMSGPAT_ARG_TYPE_CHOICE, parseError, errorCode);
750 if(U_FAILURE(errorCode)) {
760 errorCode=U_PATTERN_SYNTAX_ERROR;
772 UParseError *parseError, UErrorCode &errorCode) {
773 if(U_FAILURE(errorCode)) {
788 errorCode=U_PATTERN_SYNTAX_ERROR;
793 errorCode=U_DEFAULT_KEYWORD_MISSING;
805 errorCode=U_PATTERN_SYNTAX_ERROR;
810 errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
813 addPart(UMSGPAT_PART_TYPE_ARG_SELECTOR, selectorIndex, length, 0, errorCode);
815 parseError, errorCode); // adds ARG_INT or ARG_DOUBLE
821 errorCode=U_PATTERN_SYNTAX_ERROR;
832 errorCode=U_PATTERN_SYNTAX_ERROR;
840 errorCode=U_PATTERN_SYNTAX_ERROR;
845 errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
849 parseError, errorCode); // adds ARG_INT or ARG_DOUBLE
850 if(U_FAILURE(errorCode)) {
859 errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
862 addPart(UMSGPAT_PART_TYPE_ARG_SELECTOR, selectorIndex, length, 0, errorCode);
868 if(U_FAILURE(errorCode)) {
876 errorCode=U_PATTERN_SYNTAX_ERROR;
879 index=parseMessage(index, 1, nestingLevel+1, argType, parseError, errorCode);
880 if(U_FAILURE(errorCode)) {
933 UParseError *parseError, UErrorCode &errorCode) {
934 if(U_FAILURE(errorCode)) {
962 start, limit-start, errorCode);
976 isNegative!=0 ? -value : value, errorCode);
997 addArgDoublePart(numericValue, start, length, errorCode);
1001 errorCode=U_PATTERN_SYNTAX_ERROR;
1104 int32_t value, UErrorCode &errorCode) {
1105 if(partsList->ensureCapacityForOneMore(partsLength, errorCode)) {
1118 int32_t value, UErrorCode &errorCode) {
1120 addPart(type, index, length, value, errorCode);
1125 UErrorCode &errorCode) {
1126 if(U_FAILURE(errorCode)) {
1133 errorCode=U_MEMORY_ALLOCATION_ERROR;
1136 } else if(!numericValuesList->ensureCapacityForOneMore(numericValuesLength, errorCode)) {
1140 errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
1145 addPart(UMSGPAT_PART_TYPE_ARG_DOUBLE, start, length, numericIndex, errorCode);