Peter Royal wrote:
> On Thursday 10 January 2002 10:47 am, Stephen McConnell wrote:
> > > On a side note, I always re-throw any ComponentException's as
> > > RuntimeException's, what do other folk do?
> >
> > I generally rethrow a qualified ComponentException (qualified in
> > that it has meaningful context in the exception message).
>
> Do you wrap them in a RuntimeException or do you have "throws
> ComponentException" on many methods?
No many - generally speaking the work in done in the initialize4 method
but on occasions there is extraction and repacking of components
provided by a compooinent that is itself a container. In
these cases the component reshuffling code generally throws a
Componnet exception along the lines of ...
// inside contextualize
try
{
// do component composition stuff
}
catch( ComponentException e )
{
final String error = "some context relevant message";
throw new ComponentException( error, e );
}
About the only reason for choosing this approach is that
ComponentException is declared and documented - as opposed to
RuntimeExceptions which are less likely to get documented.
Cheers, Steve.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
- RE: Divergence from Avalon (was Re: [RT] Is Poolable Har... Paulo Gaspar
- RE: Divergence from Avalon (was Re: [RT] Is Poolable Har... Leo Sutic
- RE: Divergence from Avalon (was Re: [RT] Is Poolable Har... Paulo Gaspar
- Re: Divergence from Avalon (was Re: [RT] Is Poolable Har... Berin Loritsch
- RE: Divergence from Avalon (was Re: [RT] Is Poolable Har... Paulo Gaspar
- Re: Divergence from Avalon (was Re: [RT] Is Poolable Har... Peter Royal
- RE: Divergence from Avalon (was Re: [RT] Is Poolable Har... Stephen McConnell
- Re: Divergence from Avalon (was Re: [RT] Is Poolable Har... Berin Loritsch
- Re: Divergence from Avalon (was Re: [RT] Is Poolable Har... Peter Royal
- Re: Divergence from Avalon (was Re: [RT] Is Poolable Har... Peter Royal
- Re: Divergence from Avalon (was Re: [RT] Is Poolable Har... Stephen McConnell
- Re: Divergence from Avalon (was Re: [RT] Is Poolable Har... Peter Royal
- RE: Divergence from Avalon (was Re: [RT] Is Poolable Har... Stephen McConnell
- Re: Divergence from Avalon (was Re: [RT] Is Poolable Har... Peter Royal
- RE: Divergence from Avalon (was Re: [RT] Is Poolable Har... Stephen McConnell
- RE: Divergence from Avalon (was Re: [RT] Is Poolable Har... Leo Sutic
- RE: Divergence from Avalon (was Re: [RT] Is Poolable Har... Paulo Gaspar
- Re: Divergence from Avalon (was Re: [RT] Is Poolable Har... Peter Donald
- RE: Divergence from Avalon (was Re: [RT] Is Poolable Har... Paulo Gaspar
- Re: Divergence from Avalon (was Re: [RT] Is Poolable Har... Berin Loritsch
- RE: Divergence from Avalon (was Re: [RT] Is Poolable Har... Paulo Gaspar
