Audit of error codes

This commit is contained in:
Robin Stuart
2017-07-27 16:01:53 +01:00
parent 58e80a9ff7
commit 608b4b9134
38 changed files with 345 additions and 345 deletions

View File

@ -138,16 +138,16 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt
error_number = is_sane(NEON, source, length);
break;
default:
strcpy(symbol->errtxt, "Auspost input is wrong length (D01)");
strcpy(symbol->errtxt, "401: Auspost input is wrong length");
return ZINT_ERROR_TOO_LONG;
}
if (error_number == ZINT_ERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "Invalid characters in data (D02)");
strcpy(symbol->errtxt, "402: Invalid characters in data");
return error_number;
}
} else {
if (length > 8) {
strcpy(symbol->errtxt, "Auspost input is too long (D03)");
strcpy(symbol->errtxt, "403: Auspost input is too long");
return ZINT_ERROR_TOO_LONG;
}
switch (symbol->symbology) {
@ -169,7 +169,7 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt
h = strlen(localstr);
error_number = is_sane(GDSET, (unsigned char *) localstr, h);
if (error_number == ZINT_ERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "Invalid characters in data (D04)");
strcpy(symbol->errtxt, "404: Invalid characters in data");
return error_number;
}
@ -178,7 +178,7 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt
dpid[8] = '\0';
error_number = is_sane(NEON, (unsigned char *) dpid, strlen(dpid));
if (error_number == ZINT_ERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "Invalid characters in DPID (D05)");
strcpy(symbol->errtxt, "405: Invalid characters in DPID");
return error_number;
}