commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Botelho, Mauro" <Mauro.Bote...@turner.com>
Subject RE: [Pool] Use of Exception in API
Date Mon, 27 Sep 2004 20:05:31 GMT
There wouldn't be any changes for methods calling pools, since we are throwing a more restrict
exception (PoolException), but it would require classes extending pools to be changed.

Mauro

-----Original Message-----
From: matthew.hawthorne [mailto:matth@apache.org]
Sent: Monday, September 27, 2004 3:49 PM
To: Jakarta Commons Users List
Subject: Re: [Pool] Use of Exception in API


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: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message