Re: SAXException, checked, buy why?
On Mon, 2005-01-03 at 09:11 -0500, Karl Waclawek wrote: > A SAX event handler can handle exceptions thrown by the calls it makes. > Or it can let them escape. Depends on whether it wants to "notify" > the event generator or not. How is that not possible in Java? It sounds to me that the problem is that he does not want to have to rewrite the ContentHandler to configure this behavior for each different parse. I don't think this is possible in Java, because exceptions are based on compile-time declarations. Perhaps you could look at my sample Python code for an example of what I think he wants (which I think is only possible in such a straightforward manner with a dynamic language). In my example, changing the exception handling behavior is a matter of different handler instantiation parameters, rather than different handler code. Then again, thinking about it, maybe this could be done in Java by registering flags on the handler that are checked within the catch code block in order to change behavior. Not as straightforward, but it may work. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Use CSS to display XML - http://www.ibm.com/developerworks/edu/x-dw-x-xmlcss-i.html Full XML Indexes with Gnosis - http://www.xml.com/pub/a/2004/12/08/py-xml.html Be humble, not imperial (in design) - http://www.adtmag.com/article.asp?id=10286 UBL 1.0 - http://www-106.ibm.com/developerworks/xml/library/x-think28.html Use Universal Feed Parser to tame RSS - http://www.ibm.com/developerworks/xml/library/x-tipufp.html Default and error handling in XSLT lookup tables - http://www.ibm.com/developerworks/xml/library/x-tiplook.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ The State of Python-XML in 2004 - http://www.xml.com/pub/a/2004/10/13/py-xml.html
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format