After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 172740 - Allow failure in (error) callbacks
Allow failure in (error) callbacks
Status: RESOLVED WONTFIX
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-05 20:51 UTC by Stefan Seefeld
Modified: 2006-10-12 14:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stefan Seefeld 2005-04-05 20:51:05 UTC
libxml2 currently doesn't allow error callbacks to fail (a python callback's
exception is ignored, for example).
If python users use libxml2 with python callbacks, they expect exceptions
generated in their callbacks to be passed through to the (python) code calling
into libxml2, as they should not have to be aware of libxml2 being a C library.

For the special case of python the function 'PyErr_Occured()' will return 1
to indicate the the runtime contains a yet-to-be-processed exception.

A general mechanism may be provided for libxml2 to check success after
callbacks have been called, and abort in case of an error.
Comment 1 Daniel Veillard 2006-10-12 14:12:49 UTC
There is an xmlStopParser call that callbacks can use to force stopping
processing. W.r.t. propagating exceptions from Python -> C -> python
I have no idea how to do this. Sorry. If you have a patch why not
but I don't think I will add this, closing with WONTFIX, because honnestly
that's what will happen unless I get patch/examples...

Daniel