RE: [xml] Error handling with the XmlReader API
- From: "Stéphane Bidoul" <stephane bidoul softwareag com>
- To: <veillard redhat com>
- Cc: <xml gnome org>
- Subject: RE: [xml] Error handling with the XmlReader API
- Date: Sat, 18 Jan 2003 22:43:20 +0100
I'm polishing the error handling interface a little bit...
I think that providing locator information as an opaque
type would help future-proofing the API (in case we want
to provide additional error context in the future).
I'm planning to do something like this:
typedef void *xmlTextReaderLocatorPtr;
typedef void (*xmlTextReaderErrorFunc)(void *arg,
const char *msg,
xmlParserSeverities severity,
xmlTextReaderLocatorPtr locator);
int xmlTextReaderLocatorGetLine (xmlTextReaderLocatorPtr locator);
int xmlTextReaderLocatorGetCol (xmlTextReaderLocatorPtr locator);
const char * xmlTextReaderLocatorGetSystemId (xmlTextReaderLocatorPtr locator);
The lifetime of the locator would be the duration of the callback,
of course.
Is this ok for you?
-sbi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]