mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 00:43:32 +00:00
ICU-4281 Reduce the u_errorName usage.
X-SVN-Rev: 16919
This commit is contained in:
parent
cf2b390e5a
commit
de39e80b8c
5 changed files with 26 additions and 30 deletions
icu4c/source/common
|
@ -528,8 +528,8 @@ NameToEnum::swap(const UDataSwapper *ds,
|
|||
upname_compareRows, &cmp,
|
||||
TRUE, pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "upname_swap(NameToEnum).uprv_sortArray(%d items) failed - %s\n",
|
||||
tempMap->count, u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "upname_swap(NameToEnum).uprv_sortArray(%d items) failed\n",
|
||||
tempMap->count);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1069,8 +1069,7 @@ ucnv_swap(const UDataSwapper *ds,
|
|||
ds->swapInvChars(ds, inStaticData->name, uprv_strlen(inStaticData->name),
|
||||
outStaticData->name, pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "ucnv_swap(): error swapping converter name - %s\n",
|
||||
u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "ucnv_swap(): error swapping converter name\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1214,8 +1214,7 @@ ucnv_swapAliases(const UDataSwapper *ds,
|
|||
ds->swapInvChars(ds, inTable+offsets[stringTableIndex], 2*(int32_t)toc[stringTableIndex],
|
||||
outTable+offsets[stringTableIndex], pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "ucnv_swapAliases().swapInvChars(charset names) failed - %s\n",
|
||||
u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "ucnv_swapAliases().swapInvChars(charset names) failed\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1311,8 +1310,8 @@ ucnv_swapAliases(const UDataSwapper *ds,
|
|||
}
|
||||
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "ucnv_swapAliases().uprv_sortArray(%u items) failed - %s\n",
|
||||
count, u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "ucnv_swapAliases().uprv_sortArray(%u items) failed\n",
|
||||
count);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1820,8 +1820,8 @@ makeTokenMap(const UDataSwapper *ds,
|
|||
c1=(uint8_t)i;
|
||||
ds->swapInvChars(ds, &c1, 1, &c2, pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "unames/makeTokenMap() finds variant character 0x%02x used (input charset family %d) - %s\n",
|
||||
i, ds->inCharset, u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "unames/makeTokenMap() finds variant character 0x%02x used (input charset family %d)\n",
|
||||
i, ds->inCharset);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2000,8 +2000,7 @@ uchar_swapNames(const UDataSwapper *ds,
|
|||
udata_swapInvStringBlock(ds, inBytes+tokenStringOffset, (int32_t)(groupsOffset-tokenStringOffset),
|
||||
outBytes+tokenStringOffset, pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "uchar_swapNames(token strings) failed - %s\n",
|
||||
u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "uchar_swapNames(token strings) failed\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2080,8 +2079,8 @@ uchar_swapNames(const UDataSwapper *ds,
|
|||
ds->swapInvChars(ds, inRange+1, (int32_t)uprv_strlen((const char *)(inRange+1)),
|
||||
outRange+1, pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "uchar_swapNames(prefix string of algorithmic range %u) failed - %s\n",
|
||||
i, u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "uchar_swapNames(prefix string of algorithmic range %u) failed\n",
|
||||
i);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -611,8 +611,8 @@ ures_preflightResource(const UDataSwapper *ds,
|
|||
pBottom, pTop, pMaxTableLength,
|
||||
pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "ures_preflightResource(table res=%08x)[%d].recurse(%08x) failed - %s\n",
|
||||
res, i, item, u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "ures_preflightResource(table res=%08x)[%d].recurse(%08x) failed\n",
|
||||
res, i, item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -636,8 +636,8 @@ ures_preflightResource(const UDataSwapper *ds,
|
|||
pBottom, pTop, pMaxTableLength,
|
||||
pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "ures_preflightResource(array res=%08x)[%d].recurse(%08x) failed - %s\n",
|
||||
res, i, item, u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "ures_preflightResource(array res=%08x)[%d].recurse(%08x) failed\n",
|
||||
res, i, item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -785,8 +785,8 @@ ures_swapResource(const UDataSwapper *ds,
|
|||
item=ds->readUInt32(p[i]);
|
||||
ures_swapResource(ds, inBundle, outBundle, item, specialType, pTempTable, pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "ures_swapResource(table res=%08x)[%d].recurse(%08x) failed - %s\n",
|
||||
res, i, item, u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "ures_swapResource(table res=%08x)[%d].recurse(%08x) failed\n",
|
||||
res, i, item);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -826,8 +826,8 @@ ures_swapResource(const UDataSwapper *ds,
|
|||
ures_compareRows, pTempTable->keyChars,
|
||||
FALSE, pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "ures_swapResource(table res=%08x).uprv_sortArray(%d items) failed - %s\n",
|
||||
res, count, u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "ures_swapResource(table res=%08x).uprv_sortArray(%d items) failed\n",
|
||||
res, count);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -905,8 +905,8 @@ ures_swapResource(const UDataSwapper *ds,
|
|||
item=ds->readUInt32(p[i]);
|
||||
ures_swapResource(ds, inBundle, outBundle, item, URES_NO_SPECIAL_TYPE, pTempTable, pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "ures_swapResource(array res=%08x)[%d].recurse(%08x) failed - %s\n",
|
||||
res, i, item, u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "ures_swapResource(array res=%08x)[%d].recurse(%08x) failed\n",
|
||||
res, i, item);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -995,8 +995,8 @@ ures_swap(const UDataSwapper *ds,
|
|||
&bottom, &top, &maxTableLength,
|
||||
pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "ures_preflightResource(root res=%08x) failed - %s\n",
|
||||
rootRes, u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "ures_preflightResource(root res=%08x) failed\n",
|
||||
rootRes);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
|
@ -1030,8 +1030,7 @@ ures_swap(const UDataSwapper *ds,
|
|||
udata_swapInvStringBlock(ds, inBundle+stringsBottom, 4*(bottom-stringsBottom),
|
||||
outBundle+stringsBottom, pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "ures_swap().udata_swapInvStringBlock(keys[%d]) failed - %s\n", 4*(bottom-1),
|
||||
u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "ures_swap().udata_swapInvStringBlock(keys[%d]) failed\n", 4*(bottom-1));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1054,8 +1053,8 @@ ures_swap(const UDataSwapper *ds,
|
|||
/* swap the resources */
|
||||
ures_swapResource(ds, inBundle, outBundle, rootRes, URES_NO_SPECIAL_TYPE, &tempTable, pErrorCode);
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
udata_printError(ds, "ures_swapResource(root res=%08x) failed - %s\n",
|
||||
rootRes, u_errorName(*pErrorCode));
|
||||
udata_printError(ds, "ures_swapResource(root res=%08x) failed\n",
|
||||
rootRes);
|
||||
}
|
||||
|
||||
if(tempTable.rows!=rows) {
|
||||
|
|
Loading…
Add table
Reference in a new issue