> >thought: > >It could be nice to formalize the way we handle exceptions (like the XML > >Axis project) a little more. > > > > Can you expand on this ? > (for those of us too lazy to surf) > :-)
Apache Axis (over at XML) has a really big developer's guide: http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-axis/java/docs/developers-guide.html among which is some stuff about exceptions: http://cvs.apache.org/viewcvs.cgi/~checkout~/ xml-axis/java/docs/developers-guide.html#Exception Handling (note: wrapped link) Some of this is applicable to all software (and we could copy or reference), some only to Axis. Basically, we could have a "recommended avalon programming practices" page, which describes the way IoC/SoC and the exception mechanism work together. stuff like: Everything a container (is this a good idea for composer?) passes to a child component should only throw exceptions which the container (composer?) knows about, so the child component has the option to send the exception back to the container. This enables rapid prototyping of components. In code, it looks like this: interface SomeComponentInterface { public someMethod( SomeSpecificObjectInterface ) throws SomeComponentException; } interface SomeSpecificObjectInterface { public Something someMethod() throws SomeMethodException; // or just SomecomponentException } interface Something {} class SomeComponentException extends Exception {} class SomeMethodException extends SomeComponentException {} class SomeComponent implements SomeComponentInterface { Something m_something; public someMethod( SomeSpecificObjectInterface obj ) throws SomeComponentException { m_something = obj.someMethod(); // no try/catch neccessary } } Examples of this setup within avalon framework can be found in the Composable/ComponentManager/ComponentException and the Contextualizable/Context/ContextException interfaces and classes. --- There's lots of stuff like that, usage scenario's like JavaBeans, which we don't enforce, don't mention, don't document, but still use. It's not required to work with avalon, but it can be quite useful. - Leo -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>