On Sun, Jul 01, 2001 at 03:58:25PM -0700, Berin Loritsch wrote:
> IoC does not really apply to Exception handling.
> Logically, all that is happening is that the method
> is returning early with a class that has error
> information attached to it.  It is well understood
> for most programmers.
> 
> Using any other approach only serves to add a layer
> of complexity with no real advantage.

That depends on the component. If your component requires deferred or
non-critical exception handling, try/catch isn't good enough. That's why
Mr Megginson came up with org.xml.sax.ErrorHandler.

Perhaps I'm not alone in this.. I've always thought of SAX as *the* most
widely known example of IoC in a Java API. As such, it seems natural to
wonder whether SAX's unusual error handling is a consequence of it's
"invertedness", and if so, whether this has implications for Avalon.


--Jeff

(Looking forward to that Avalon whitepaper/research thingy of yours:)


> Exceptions are used to exit a method early--the approach you outlined
> merely calls a method on a calling class.  Exceptions are
> method-centric, not class-centric.
> 
> 
> --- Jeff Turner <[EMAIL PROTECTED]> wrote:
> > Hi,
> > 
> > Java's exception handling is "active". It is driven
> > by the callee, not
> > the caller. When an exception is thrown, the callee
> > effectively calls
> > the catch {} block of the caller. So now if I'm
> > using a passive API like
> > Avalon, and a Component throws an exception, doesn't
> > that break IoC?
> > Since when does "a passive entity that performs a
> > specific role"[1] get
> > to tell me, the caller, what to do?
[..]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to