xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott_B...@lotus.com
Subject Exception Architecture (was Re: JDOM... etc.)
Date Fri, 06 Apr 2001 16:40:50 GMT

The problem is that those errors have to be reported through the pipeline.
So when I run the XSLT processor I need to report errors from the XML
processor.  Since JAXP 1.1 chose to specify TransformerException to be
generic from SAX or DOM or whatever, the SAX exceptions have to be wrapped
with Transformer exceptions.  And so it goes... checked exceptions can
cause dependencies all along the call chain, and often have to be wrapped
with some other exception anyway, and a runtime exception if you have to
pass the call through some API that you can't control.  And while checked
exceptions are very clear and specific, they can really add to the codesize
of the calling program.

If we change the DTM to use checked exceptions, I have to change about
4,000 lines of code in Xalan that used to call the DOM but now calls the
DTM to now handle the checked exceptions.  This is a fair amount of pain,
and I'm not sure what it will buy us.

-scott




                                                                                         
                         
                    Andy Clark                                                           
                         
                    <andyc@apache        To:     general@xml.apache.org               
                            
                    .org>                cc:     (bcc: Scott Boag/CAM/Lotus)          
                            
                                         Subject:     Re: JDOM in Apache (was Re: xml.apache.org
charter proposal) 
                    04/06/01                                                             
                         
                    05:36 PM                                                             
                         
                    Please                                                               
                         
                    respond to                                                           
                         
                    general                                                              
                         
                                                                                         
                         
                                                                                         
                         




Arnaud Le Hors wrote:
> My vote goes for runtime exceptions. I personally don't like static
> exceptions at all. I think the choice to catch an exception should
> always be left to the user...

I disagree. The types of errors that we're talking about are
not runtime variety of exceptions, they are XML processing
exceptions. I don't see a problem with explicitly declaring
what exceptions can be thrown and must be caught. I think
it's worse when left up to the user. Just my two yen.

--
Andy Clark * IBM, TRL - Japan * andyc@apache.org

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org






---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message