commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Botelho, Mauro" <>
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.


-----Original Message-----
From: matthew.hawthorne []
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:
For additional commands, e-mail:

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

View raw message