commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: [collection] Transformer exception handling
Date Sat, 15 Jun 2002 17:22:50 GMT
From: "Ola Berg" <ola.berg@arkitema.se>
> This is one of the two reasons why I don\'t use jakartas framework (yet)
but stick to my own. The generic transforming method needs to be declared as
throwing exceptions.
>
> My Transformation interface (a Transformation is the thing doing the
Transformation from one class to another, the Transformer is the surrounding
framework) throws InstantiationException and InvocationTargetException
(since some reflection almost always is there). InvocationTargetException
wraps another Exception, and this is how java.lang.reflect deals with it.

I don't agree with the comment  "some reflection almost always is there".  I
believe there are plenty of transformations that don't need reflection.

> At one time, I let it throw Exception, but I have changed into the two
mentioned.

If it was to have an exception, Exception seems most appropriate. However, I
doubt we'll change the commons Transformer interface, and I wouldn't want
to.

Stephen



--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message