[
Lists Home |
Date Index |
Thread Index
]
* Uche Ogbuji <uche.ogbuji@fourthought.com> [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@engrm.com
- References:
- SAXException, checked, buy why?
- From: Alan Gutierrez <alan-xml-dev@engrm.com>
- Re: [xml-dev] SAXException, checked, buy why?
- From: David Megginson <david.megginson@gmail.com>
- Re: [xml-dev] SAXException, checked, buy why?
- From: Alan Gutierrez <alan-xml-dev@engrm.com>
- Re: [xml-dev] SAXException, checked, buy why?
- From: Alan Gutierrez <alan-xml-dev@engrm.com>
- Re: [xml-dev] SAXException, checked, buy why?
- From: Uche Ogbuji <uche.ogbuji@fourthought.com>
|