Fernando Herrera (46a64f94) at 24 Jan 22:33
I have updated the code to add a new getErrorCode function. I have kept isOk() to avoid changes on the rest of the implementations, but I am happy to change that too if nothing external is using this API.
Also another nice change would be just relying on those errIO from error() by installing an error callback. Again, we would need to modify the api to add a couple of categories to ErrorCategory to properly map all errors but we will save some lines of code after it :)
done!
Fernando Herrera (d04b1248) at 24 Jan 00:35
ImageOutputDev: report error codes, so pdfimages can return 99 on i...
this is a fix for issue #1460
Fernando Herrera (5e3823a0) at 23 Jan 15:27
pdfimages: return exit code 2 when error opening output files
This is the current behavior:
fer@dyckola:~$ pdfimages test-manuscript.pdf /dev/null/cannot-write-here/page-
I/O Error: Couldn't open image file '/dev/null/cannot-write-here/page--000.ppm'
fer@dyckola:~$ echo $?
0
But according to the man page it should be 2:
EXIT CODES
The Xpdf tools use the following exit codes:
0 No error.
1 Error opening a PDF file.
2 Error opening an output file.
3 Error related to PDF permissions.
99 Other error.