commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <>
Subject Re: DBCP/LANG
Date Tue, 13 Aug 2002 20:22:59 GMT writes:

> Aha ! I knew they are used somewhere. 
> I personally prefer using introspection - getNextException, getCause, etc
> are common patterns, so just casting to SAX and SQL exceptions only
> handles the 'origin' of this naming patern.

My current/suggested implementation first tries instanceof for a few
known exceptions types, the falls back to introspection of known
patterns.  This has the potential of missing a chained exception in an
obscure case where a custom exception both extends a known type and
adds its own chaining, but seems like a reasonable trade-off
considering that if you're using/extending one of the known exception
types that you should be using its API for exception chaining.

Daniel Rall <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message