-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
I feel, the return codes of verapdf shall be documented.
I reverse engineered from the code:
VALID(0, "All files validated."),
INVALID(1, "Invalid PDF/A file(s) found."),
BAD_PARAMS(2, "Invalid command line parameters."),
OOM(3, "Out of Java heap space (memory)."),
NO_FILES(4, "No files to process."),
IO_EXCEPTION(6, "I/O Exception while processing."),
FAILED_PARSING(7, "Failed to parse one or more files."),
ENCRYPTED_FILES(8, "Some PDFs encrypted."),
VERAPDF_EXCEPTION(9, "VeraPDF exception while processing."),
JAXB_EXCEPTION(10, "Java XML marshalling exception while processing result."),
FAILED_MULTIPROCESS_START(11, "Failed to start multiprocess"),
INTERRUPTED_EXCEPTION(12, "Interrupted exception while processing");
In addition some comments:
- I think, the comment on 0 is wrong. It means all files validated and proven valid.
- I wonder that 1 refers to PDF/A only, it must mean that found a PDF file not conforming to the standard claimed.
- 5 does not exist. is this by accident?
- 4 is in a sense a warning, that no file has been specified.
- 3, 6-12: in fact tests could not be performed for several reasons.
If applying to a single file, then 1 means that the test could be performed and it failed.
The other non0 values mean that the proper tests could not be performed.
If we drop the restriction of 1 file,
4 means no file adressed.
If at least one file addressed,
- I suppose that with more files, code >1 means found at least one file with one of the given problems.
- code 1 means, all files could be checked, but at least one turned out not to be conform.
- Return code 0 means all could be checked and all turned out to be ok, and the set of checked files is not empty.