Re: ErrorHandler questions
David Megginson <[email protected]> Fri, 7 Jan 2005 13:14:27 -0500
| Newsgroups | gmane.text.xml.sax.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 07 Jan 2005 11:32:10 -0500, Karl Waclawek <[email protected]> wrote: > 1) Is it legal for an application's content handler to > call-back on the error handler? That is an excellent question, and one that I had never considered. I suppose that it is allowed, since it's not explicitly forbidden, but it does make a bit of a mash of encapsulation (the content handler is forced to hold or be able to obtain a reference to the error handler). Also, it is possible that many existing SAX apps assume that only XML-related errors come through ErrorHandler. > 2) Related to previous ContentHandler message: > If a SAX event stream can be legally generated from other sources > than parsing an actual XML document, is then the definition of > the SAXParseException as argument for ErrorHandler call-backs > not a little narrow? That falls out from the first one. If ErrorHandler is only for XML parsing errors, then presumably there's no problem; if you start using it for application errors, things get trickier. Given that additional point, it looks like using ErrorHandler for application errors isn't such a hot idea, but I don't have any real experience with that. Has anyone else played around in this area? All the best, David -- http://www.megginson.com/ ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ List: sax-devel, [email protected] See: http://www.saxproject.org/ https://lists.sourceforge.net/lists/listinfo/sax-devel