Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Error handlers not set correctly #23

tewha opened this Issue · 2 comments

1 participant


Per the libxml2 documentation for xmlSetStructuredErrorFunc:

Function to reset the handler and the error context for out of context structured error messages. This simply means that @handler will be called for subsequent error messages while not parsing nor validating. And @ctx will be passed as first argument to @handler For multi-threaded applications, this must be set separately for each thread.

Unfortunately, KissXML only attempts to set these functions as part of +initialize. Instead, they need to be installed each time a call is made into the library that could fail.

This is probably a fairly large issue, and potentially unfixable at the library level; having a public class method to install the error handlers would probably be sufficient. This way, code intentionally using KissXML off the main thread could specifically initialize the error handlers.


I take back this being a difficult problem to solve in the library: There are only a couple places where KissXML checks the error. It's easy enough to call a new [DDXMLNode installErrorHandlersInThread] there.


Obsoleted by pull request #24.

@tewha tewha closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.