IncommensurableException extends RuntimeException

5 views
Skip to first unread message

Martin Desruisseaux

unread,
Jan 10, 2011, 6:45:55 AM1/10/11
to units...@googlegroups.com
Hello all

(Sorry for cross-posting; just realized that I should probably post on
units...@googlegroups.com instead than unitsof...@jscience.dev.java.net).

I just noticed that in the org.unitsofmeasurement interfaces, the
IncommensurableException is now an unchecked exception instead than a checked
one. This exception is thown only by the Unit.getConverterToAny(Unit<?>) method.

I guess that there is pros and cons for making IncommensurableException
unchecked. Personally, I liked better the checked exception in order to force me
to deal with units that are not garanteed to be convertible. Would it be
possible to:

1) either turn back IncommensurableException as a checked exception;

2) or if IncommensurableException stay unchecked, extends UnconvertibleException
rather than RuntimeException directly.

Regards,

Martin

Werner Keil

unread,
Jan 11, 2011, 1:52:08 PM1/11/11
to units-users
Martin,

Thanks for re-posting it here, too.

I believe you have an account for Google Code, so could you please
create an issue here:
http://code.google.com/p/unitsofmeasure/issues/list

Thanks,
Werner
Reply all
Reply to author
Forward
0 new messages