> So how about providing, in org.apache.avalon.framework, an ErrorHandler
> interface and DefaultErrorHandler implementation, just like SAX does?
> That way, most people can continue to use Java's built-in exception
> handling, and those who need the extra control can use ErrorHandlers,
> all within the Avalon framework.

Jeff,

the problem I see is that you get much stronger coupling between the
component and the composer. In order to recover from an error the
composer/error handler needs to know the state of the component, which is
implementation specific. (And if the error handler can not recover, what's
the point? Then it is just a Logger.)

I prefer components that expose few methods, do a lot themselves, and raise
exceptions when they simply can not proceed. Adding error handlers to each
component increases complexity and leads to the hyperflexibility syndrome,
IMO.

That said, I believe that some components may benefit from using the
Strategy pattern (provide an object the component can call for further
orders), like the Pool/PoolController in Excalibur. However, do not think
that this needs to be done all across Avalon/Excalibur.

/LS


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

Reply via email to