Quoting robert burrell donkin <[EMAIL PROTECTED]>:
> On 1 Mar 2004, at 20:17, Simon Kitching wrote:
>
> <snip>
>
> >> From a quick glance at the code, it looks like Digester registers
> >> itself
> > as an org.xml.sax.ErrorHandler (it extends
> > org.xml.sax.helpers.DefaultHandler), and that by default it ignores all
> > sax errors:
> >
> > public void error(SAXParseException exception) throws SAXException
> > {
> >
> > log.error("Parse Error at line " + exception.getLineNumber() +
> > " column " + exception.getColumnNumber() + ": " +
> > exception.getMessage(), exception);
> > if (errorHandler != null) {
> > errorHandler.error(exception);
> > }
> >
> > }
>
> yep
>
> > Craig/Robert: why does Digester ignore sax errors by default?
>
> (if i was being pendantic, i'd say that strictly speaking digester
> doesn't ignore them so much as only log them ;)
>
> craig would be the one to give a definite answer on this one but here
> how i see it:
>
> the default behaviour for SAX parsers is to ignore errors. digester
> simply extends this behaviour to provide better diagnostics.
That was pretty much the original reasoning. At the end of the day, Digester is
just a pretty face around a SAX parse.
> i do agree
> that it's a more than a little unintuitive. maybe we could provide a
> boolean flag to allow the user to select the behaviour they want.
>
Well, we actually went one better than that by letting you register your own
ErrorHandler to which Digester will delegate. Now you can do anything you
want.
> - robert
Craig
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]