Hello,
I'm looking into NUMBERS-40, which suggests that the exception behavior of
commons-numbers (specifically the gamma package) needs to be made more
consistent. Below is a summary of the public exception types explicitly thrown
by each module.
arrays
IndexOutOfBoundsException
IllegalArgumentException
combinatorics
IllegalArgumentException
NoSuchElementException
UnsupportedOperationException
complex
NumberFormatException
IllegalArgumentException
complex-streams
IllegalArgumentException
core
ArithmeticException
IllegalArgumentException
fraction
ArithmeticException
IllegalArgumentException
gamma
IllegalArgumentException
primes
IllegalArgumentException
quaternion
NumberFormatException
IllegalArgumentException
IllegalStateException
rootfinder
IllegalArgumentException
Nothing in this list strikes me as being inconsistent. The types are all
standard JDK exception types and seem to be used appropriately, IMO. Is there
any work that needs to be done on this issue?
Regards,
Matt J