commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "matthew.hawthorne" <>
Subject Re: [Pool] Use of Exception in API
Date Mon, 27 Sep 2004 19:48:32 GMT
Rodney Waldhoff wrote:
> Fundamentally this is a drawback to a strongly typed, checked exception 
> system.  I don't see how "replacing Exception with more specific 
> exceptions" could possibly work in the general case.

It at least would allow clients to avoid catching NullPointerExceptions, 
IllegalArgumentExceptions, and other RuntimeExceptions.

I've always disliked 'throws Exception' for this reason, and I think 
that creating a PoolException or something similar would be a good solution.

Unfortunately, this would change the public API and is probably 
impossible.  I've also barely used [pool] so I may be missing some more 
serious issues.

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

View raw message