[libxml++] RE: [xml] -fexceptions
- From: Murray Cumming Comneon com
- To: graham-libxml simulcra org
- Cc: libxmlplusplus-general lists sourceforge net
- Subject: [libxml++] RE: [xml] -fexceptions
- Date: Thu, 31 Jul 2003 07:35:37 +0200
> From: Graham Bennett [mailto:graham-libxml simulcra org]
> On Wed, Jul 30, 2003 at 09:29:07AM +0200,
> Murray Cumming Comneon com wrote:
> > > From: Graham Bennett [mailto:graham-libxml simulcra org]
> > > It would be
> > > very useful to
> > > > > be able to throw from SAX callbacks when using libxml
> from C++.
> >
> > libxml++ has a solution for this without rebuilding libxml:
> > http://libxmlplusplus.sourceforge.net.
>
> I have looked at this and there are a few problems with
> libxml++ from my
> point of view (these might not hold any longer).
I am CCing this to the libxml++ list for you:
> - exception handling solution requires callbacks to throw only
> exceptions that derive from the libxml++ exception type.
> If anything
> else is thrown then problems will occur if -fexceptions
> isn't turned
> on. I think at least libxml++ should catch (...) and
> throw a generic
> exception, for safety's sake. In my environment it's not practical
> to catch all possible exceptions and rethrow without losing
> information about the original exception.
>
> - the sax callback interface doesn't expose quite as much information
> as I can get from using libxml directly.
What do you need exactly?
> - in the libxml++ design, I am paying for virtual function calls for
> every callback, which I would rather avoid.
It's just one more function call. I wouldn't worry about it unless you can
prove that it's significant.
> - libxml++ doesn't treat extern "C" properly. the functions it
> registers in the libxml sax handler struct should be
> declared extern
> "C" but aren't. This seems to be fine with g++, but other
> compilers
> (correctly) report that the type of the function pointer
> in the struct
> is different to the type of the function pointer being passed.
A patch would be welcome.
> - finally I couldn't get libxml++ to compile with the sun
> c++ compiler,
> although I didn't try too hard.
Details would help us. I'd really like libxml++ to work with Forte.
Murray Cumming
murrayc usa net
www.murrayc.com
Remember to use the "Reply To All" feature with mailing lists.
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]