From: Chris H. <ch...@op...> - 2003-09-25 17:14:53
|
IanS and I have been working through some of his DataSource ideas today, and one area that we've hit upon is our DataSourceExceptions, a traditional point of contention between jdbc and file datasources, as jdbc always throws SQLExceptions, while files throw IOExceptions. Throwing IOExceptions seems to make a bit more sense, as not all our datasources are SQL-based, but it also seems a bit out of place to have an error in resultSet.close() throw an IOException. So our new proposal is to have DataSourceException sub-class IOException. We'll still be able to wrap other exceptions, even though IOException doesn't allow this in it's constructor, as Ian has come up with a way to work around it. Doing things this way will allow clients to just catch IOExceptions, instead of having to catch both, and is just a bit cleaner way of doing things. rmi Remote Exceptions and Corba Exceptions also sub class IOException. Also, see http://www.artima.com/intv/solid3.html for a mention of IOExceptions. IanS and I are both +1 on this proposal. Chris |