1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-01-23 11:56:03 +00:00

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

@@ -641,18 +641,18 @@ int codablock(struct zint_symbol *symbol, unsigned char source[], int length) {
/* option1: rows 0: automatic, 1..44 */
rows = symbol->option_1;
if (rows > 44) {
strcpy(symbol->errtxt, "Row parameter not in 0..44");
strcpy(symbol->errtxt, "Row parameter not in 0..44 (D10)");
return ZINT_ERROR_INVALID_OPTION;
}
/* option_2: (usable data) columns: 0: automatic, 6..66 */
columns = symbol->option_2;
if ( ! (columns <= 0 || (columns >= 6 && columns <=66)) ) {
strcpy(symbol->errtxt, "Columns parameter not in 0,6..66");
strcpy(symbol->errtxt, "Columns parameter not in 0,6..66 (D11)");
return ZINT_ERROR_INVALID_OPTION;
}
/* GS1 not implemented */
if (symbol->input_mode == GS1_MODE) {
strcpy(symbol->errtxt, "GS1 mode not supported");
strcpy(symbol->errtxt, "GS1 mode not supported (D12)");
return ZINT_ERROR_INVALID_OPTION;
}
#ifndef _MSC_VER
@@ -714,7 +714,7 @@ int codablock(struct zint_symbol *symbol, unsigned char source[], int length) {
Error=Columns2Rows(T,data,dataLength,&rows,&useColumns,pSet,&fillings);
}
if (Error != 0) {
strcpy(symbol->errtxt, "data string to long");
strcpy(symbol->errtxt, "data string to long (D13)");
return Error;
}
/* Checksum */