InvalidToleranceException
This exception is thrown whenever a provided tolerance value is invalid. This exception will almost exclusively be thrown when a tolerance value is negative - all tolerance values must be positive.
Methods
InvalidToleranceException(String s)
Constructs a new InvalidToleranceException with the specified detail message.
s: The detail message (aString) explaining the reason for the exception.
throwIfInvalid(String message, double tolerance)
Static method that throws an InvalidToleranceException if the provided tolerance is less than 0.
message: The message to be used for the exception if it is thrown.tolerance: The tolerance value to validate.