2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-23 03:18:59 +00:00
git-svn-id: svn+q:///qpdf/trunk@896 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2009-10-23 17:00:49 +00:00
parent 3f1f156e1b
commit b052ca548e

View File

@ -18,9 +18,10 @@ static void report_errors()
printf(" pos : %ld\n", qpdf_get_error_file_position(qpdf, e)); printf(" pos : %ld\n", qpdf_get_error_file_position(qpdf, e));
printf(" text: %s\n", qpdf_get_error_message_detail(qpdf, e)); printf(" text: %s\n", qpdf_get_error_message_detail(qpdf, e));
} }
e = qpdf_get_error(qpdf);
if (qpdf_has_error(qpdf)) if (qpdf_has_error(qpdf))
{ {
e = qpdf_get_error(qpdf);
assert(qpdf_has_error(qpdf) == QPDF_FALSE);
printf("error: %s\n", qpdf_get_error_full_text(qpdf, e)); printf("error: %s\n", qpdf_get_error_full_text(qpdf, e));
printf(" code: %d\n", qpdf_get_error_code(qpdf, e)); printf(" code: %d\n", qpdf_get_error_code(qpdf, e));
printf(" file: %s\n", qpdf_get_error_filename(qpdf, e)); printf(" file: %s\n", qpdf_get_error_filename(qpdf, e));
@ -29,6 +30,7 @@ static void report_errors()
} }
else else
{ {
e = qpdf_get_error(qpdf);
assert(e == 0); assert(e == 0);
assert(qpdf_get_error_code(qpdf, e) == qpdf_e_success); assert(qpdf_get_error_code(qpdf, e) == qpdf_e_success);
(void)qpdf_get_error_full_text(qpdf, e); (void)qpdf_get_error_full_text(qpdf, e);