mirror of
https://git.code.sf.net/p/zint/code
synced 2025-06-03 08:28:44 -04:00
Add identifiers to error messages
To ease the debug process
This commit is contained in:
parent
5405035df1
commit
4561a66067
35 changed files with 296 additions and 298 deletions
|
@ -66,7 +66,7 @@ int telepen(struct zint_symbol *symbol, unsigned char source[], int src_len) {
|
|||
count = 0;
|
||||
|
||||
if (src_len > 30) {
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
strcpy(symbol->errtxt, "Input too long (C90)");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
/* Start character */
|
||||
|
@ -75,7 +75,7 @@ int telepen(struct zint_symbol *symbol, unsigned char source[], int src_len) {
|
|||
for (i = 0; i < src_len; i++) {
|
||||
if (source[i] > 126) {
|
||||
/* Cannot encode extended ASCII */
|
||||
strcpy(symbol->errtxt, "Invalid characters in input data");
|
||||
strcpy(symbol->errtxt, "Invalid characters in input data (C91)");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
strcat(dest, TeleTable[source[i]]);
|
||||
|
@ -113,14 +113,14 @@ int telepen_num(struct zint_symbol *symbol, unsigned char source[], int src_len)
|
|||
count = 0;
|
||||
|
||||
if (temp_length > 60) {
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
strcpy(symbol->errtxt, "Input too long (C92)");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
ustrcpy(temp, source);
|
||||
to_upper(temp);
|
||||
error_number = is_sane(NEON, temp, temp_length);
|
||||
if (error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "Invalid characters in data");
|
||||
strcpy(symbol->errtxt, "Invalid characters in data (C93)");
|
||||
return error_number;
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ int telepen_num(struct zint_symbol *symbol, unsigned char source[], int src_len)
|
|||
|
||||
for (i = 0; i < temp_length; i += 2) {
|
||||
if (temp[i] == 'X') {
|
||||
strcpy(symbol->errtxt, "Invalid position of X in Telepen data");
|
||||
strcpy(symbol->errtxt, "Invalid position of X in Telepen data (C94)");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue