-1 ** (2*n - 1) for me (where n is a natural number). Now, what about an SQLException with an IOException as its cause? Or vice versa?
In my experience, developers designing their own exception hierarchy is a bad sign ... If this news exception is checked the first thing that is going to happen that someone will need to pass this new exception through an interface without throws, and it will get chained ... On 25/06/10 13:51, christian.muel...@nvoe.at wrote: > A big +++++1 one for this proposal, having our own > FeatureAccessException with a Constructor > FeatureAccessException(Exception ex). > > The IOException drives me crazy, because in Java 5 there is no > constructor IOException(Exception ex), in Java 6 there is. > > Getting a backend exception (e. g. SQLException) is problematic. What to do ? > a) throw new RuntimeException(sqlEx) > b) throw new IOException (sqlEx.getMessage()) > > Neither of them is a lucky solution. Having our own exception makes > the interfaces consistent, we can always save the original exception > and we can build a nice Exception hierarchy if we need. > (FeatureReadException,FeatureWriteException,FeatureMetaDataException,,,) > > IMHO, Very good idea. > > > > Quoting Michael Bedward<michael.bedw...@gmail.com>: > >> On 25 June 2010 14:01, Ben Caradoc-Davies wrote: >>> [I'm going to hide under my desk until Andrea has cooled down.] >> >> Don't imagine you'll be safe there Ben. A few weeks ago Andrea was on >> the verge of nuking Sydney because of something Jody said. >> >> This might be a dumb question (I don't know much about Exception >> handling) but isn't the least worst approach to the problem of >> 'leaking' implementation into interface to wrap IOException, >> SQLException etc into some GeoTools exception class, e.g. called >> something like FeatureAccessException, and stick that in the interface >> signatures ? >> >> Michael >> >> ------------------------------------------------------------------------------ >> ThinkGeek and WIRED's GeekDad team up for the Ultimate >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the >> lucky parental unit. See the prize list and enter to win: >> http://p.sf.net/sfu/thinkgeek-promo >> _______________________________________________ >> Geotools-devel mailing list >> Geotools-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/geotools-devel >> > > > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > -- Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au> Software Engineering Team Leader CSIRO Earth Science and Resource Engineering Australian Resources Research Centre ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel