Add identifiers to error messages

To ease the debug process
This commit is contained in:
Robin Stuart 2016-10-28 22:40:40 +01:00
parent 5405035df1
commit 4561a66067
35 changed files with 296 additions and 298 deletions

View file

@ -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;
}