[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pdf-devel] what's happening with error reporting?
From: |
Cirilo Bernardo |
Subject: |
[pdf-devel] what's happening with error reporting? |
Date: |
Thu, 22 May 2008 19:44:43 +1000 |
What's the latest news on error reporting within the libs?
The GNU docs recommend something like
fprintf(stderr, __FILE__ ": %d: something went wrong: %s\n", __LINE__, cause);
So for example, this bit from pdf-stm-f-a85.c:
if (count != 0)
{
/* Error: z inside ascii85 5-tuple */
error;
}
can be changed to something like:
if (count != 0)
{
/* Error: z inside ascii85 5-tuple */
fprintf(stderr, __FILE__ ": %d: 'z' inside ascii85 5-tuple\n", __LINE__-3);
error;
}
If you could indicate the position within the FILE (not within the
stream), that may be useful for debugging the read/write routines
later on because you can use a hex editor to inspect the file.
- [pdf-devel] what's happening with error reporting?,
Cirilo Bernardo <=