proper use of IllegalArgumentException
I am making a pseudorandom number generator for my first Java project. It works by having variables multiply by each other and then using the modulus operator. The output from that method is recorded by what range the number was in. That number is then used to replace one of the original variable values that will output a new number after the method is used again. The process repeats many times putting the numbers in 10 groups to see how random the variable selection was.
If a negative number is used on one of the variables, there is not a mathematical error, but it puts all the random numbers in just one of the 10 groups thus making the method useless. Is programmer discretion a case for IllegalArgumentException because he sees unfavorable results by using a negative value, or are throws only used when it will make an error in the program such as dividing by zero?