mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Add identifiers to error messages
To ease the debug process
This commit is contained in:
@ -52,7 +52,7 @@ int code_49(struct zint_symbol *symbol, unsigned char source[], const int length
|
||||
size_t h;
|
||||
|
||||
if (length > 81) {
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
strcpy(symbol->errtxt, "Input too long (D30)");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
if (symbol->input_mode == GS1_MODE) {
|
||||
@ -64,7 +64,7 @@ int code_49(struct zint_symbol *symbol, unsigned char source[], const int length
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
if (source[i] > 127) {
|
||||
strcpy(symbol->errtxt, "Invalid characters in input data");
|
||||
strcpy(symbol->errtxt, "Invalid characters in input data (D31)");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
if (gs1 && (source[i] == '['))
|
||||
@ -215,7 +215,7 @@ int code_49(struct zint_symbol *symbol, unsigned char source[], const int length
|
||||
}
|
||||
|
||||
if (codeword_count > 49) {
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
strcpy(symbol->errtxt, "Input too long (D32)");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user