[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: SAXException, checked, buy why?


saxexception
* Uche Ogbuji <uche.ogbuji@f...> [2005-01-02 20:33]:

> On Sun, 2005-01-02 at 19:46 -0500, Alan Gutierrez wrote:

> >     I'm hoping that I'm not talking to myself on this one. If this
> >     is too Java oriented, tell me, but I'd like to sort this out so
> >     that maybe I can create something worth sharing.

> It may be Java-oriented because I don't understand the problem.
> Speaking for the Python case, since you don't have to declare
> exceptions, the handler can throw anything it pleases, which, if not
> handled by the driver falls to the original parse-calling code.

    I'm not Python-oriented, so I might be making hash of this
    response, but I think this is a generic concern.

    Assume no checked exceptions. That is some Java hand-wringing
    that I'll discuss with Java developers if they are interested.
    
    <java-specific-musing boring-for="Uche">

        What do you do in any language with a typical exception
        facility, when you have an event conduit that sends messages
        to disparate event handlers, any of which can pitch
        exceptions.

        If you invoke open file, you can expect a set of exceptions
        that should be listed with the open file method.

        If you invoke handle event, you don't now what to expect.
        (Or do you? Actually, I might be looking for a means to undo
        the damage wraught by checked exceptions.)

        Asking: "How do you provide the fellow who invokes the event
        conduit with a means to pitch an exception that they will
        know to catch?" of a Python programmer is begging for flames.

        Sorry, it didn't occur to me until I wrote it.
    
    </java-specific-musing>
        
    How do you provide the fellow who invokes the event conduit with
    a means to intercept exceptions at the event handler?
    
    Say I've a content handler that likes to open files. The action
    to take when a file is not found could be to skip it an move on,
    or it could be that the file can be fabricated real quick, or it
    could be that processing has to abort via an exception.
    
    This is an application descision. How does the application
    developer configure the content handler so that the exceptional
    condition is handled during the event?

--
Alan Gutierrez - alan@e...

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.