commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <...@finemaltcoding.com>
Subject Re: DBCP/LANG
Date Tue, 13 Aug 2002 20:22:59 GMT
costinm@covalent.net 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 <dlr@finemaltcoding.com>

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message