Maybe some examples would be helpful.

-- Miguel Muñoz






On Sunday, February 2, 2020, 02:17:29 AM PST, Gilles Sadowski 
<gillese...@gmail.com> wrote: 





Hi.

2020-01-26 16:54 UTC+01:00, Matt Juntunen <matt.juntu...@hotmail.com>:
> 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

Some methods throw "ArithmeticException" while others throw
"IllegalArgumentException".  IIRC, my issue was whether there
were cases where the behaviour is not consistent from a
user POV (IOW, where the same behaviour would be expected).

[Note: I did not review all the packages.  But I don't recall there
were this kind of issue.]

Gilles


>
> 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

>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to