ICU-405 show in error message which table key is duplicated

X-SVN-Rev: 1431
This commit is contained in:
Markus Scherer 2000-05-22 21:23:48 +00:00
parent 4ac3751ce3
commit e3f05d0397

View File

@ -18,6 +18,7 @@
#include "reslist.h" #include "reslist.h"
#include "unewdata.h" #include "unewdata.h"
#include "unicode/ures.h" #include "unicode/ures.h"
#include "error.h"
#define BIN_ALIGNMENT 16 #define BIN_ALIGNMENT 16
@ -676,6 +677,10 @@ void table_add(struct SResource *table, struct SResource *res, UErrorCode *statu
res->fNext = current; res->fNext = current;
return; return;
} else { /* Key already exists! ERROR! */ } else { /* Key already exists! ERROR! */
char msg[100]={ "duplicate key '" };
uprv_strcat(msg, (list->fRoot->fKeys)+(current->fKey));
uprv_strcat(msg, "' in table");
setErrorText(msg);
*status = U_UNSUPPORTED_ERROR; *status = U_UNSUPPORTED_ERROR;
return; return;
} }