From 72c10d8617c799432e28dabf1679b1a6f5245c02 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 10 Dec 2021 11:09:42 -0500 Subject: C API: overhaul error handling * Handle error conditions that occur when using the object handle interfaces. In the past, some exceptions were not correctly converted to errors or warnings. * Add more detailed information to qpdf-c.h * Make it possible to work more explicitly with uninitialized objects --- manual/qpdf-manual.xml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'manual/qpdf-manual.xml') diff --git a/manual/qpdf-manual.xml b/manual/qpdf-manual.xml index fd3bd6fb..f7d224e5 100644 --- a/manual/qpdf-manual.xml +++ b/manual/qpdf-manual.xml @@ -5229,6 +5229,19 @@ print "\n"; discussion. + + + Overhaul error handling for the object handle functions in + the C API. See comments in the “Object handling” + section of include/qpdf/qpdf-c.h for + details. In particular, exceptions thrown by the underlying + C++ code when calling object accessors are caught and + converted into errors. The errors can be trapped by + registering an error handler with + qpdf_register_oh_error_handler or will + be written to stderr if no handler is registered. + + Add qpdf_get_last_string_length to the @@ -5239,9 +5252,9 @@ print "\n"; - Add qpdf_oh_is_initialized to the - C API. While you can't directly create uninitialized objects - from the C API, you still have to be able to detect them. + Add qpdf_oh_is_initialized and + qpdf_oh_new_uninitialized to the C API + to make it possible to work with uninitialized objects. -- cgit v1.2.3-54-g00ecf