[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] Error handling with the XmlReader API
- From: Daniel Veillard <veillard redhat com>
- To: Stéphane Bidoul <stephane bidoul softwareag com>
- Cc: xml gnome org
- Subject: Re: [xml] Error handling with the XmlReader API
- Date: Fri, 17 Jan 2003 05:36:45 -0500
On Fri, Jan 17, 2003 at 11:07:51AM +0100, Stéphane Bidoul wrote:
> > Okay, looks good, compiles and regression tests are fine. I added
> > readererr.py to the python tests. My only little concern is about
> > varargs, I hope you followed the existing code in error.c because I
> > remember it took a few iterations before getting reliable and portable
> > code for varargs error handlers...
>
> I copied buildMessage from libxml.c in the python bindings,
> but it looks very similar to the XML_GET_VAR_STR macro in errors.c.
> <stdarg.h> is required for compile, as in error.c...
>
> While coding this, I noticed I was providing a distinction
> between validation errors and other errors. I did not provide
> such a distinction for the xmlParserCtxt error handlers
> at the python level.
> Is such a distinction useful?
Yes because a validation error is not a fatal error parser error
and both kind of errors tends to be processed in very different ways.
However it seems to me that the python bindings provide adequate support
since the type of error/warning is provided (parser vs. validity).
> Should I add the 2 necessary callbacks for the xmlParserCtxt
> python bindings?
No the error level should be sufficient to distinguish the case.
an unified callback is not a problem, the key is to be able to distinguish
the level of the error.
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]