On 21/03/2010, at 7:18 PM, Andrea Aime wrote:

> I really want to throw that exception, the current setup
> (MapProjection.inverse() removing a base class exception)
> is an over simplification of reality: it is just normal,
> imho, to assume some projections are too hard to
> invert.

I think you should; it is a nice reflection of reality (and we are willing to 
break reality to be right if we have to).

> Let's just make MapProjection play by the MathTransform rules
> instead (that is, don't blindly assume all map projections
> are invertible and declare to throw the exception).

yep.

> Ah, why don't throw UnpportedOperationException? Because it
> will break all the MathTransform users, which I believe
> are the majority.

> You write code assuming MathTransform, prepare for the checked
> exception that invert() might throw and boom, invert() throws one you
> were not prepared for, and the execution flow goes south.

Cheers,
Jody
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to