Difference between InvalidParameterException and IllegalArgumentException
807589Nov 24 2008 — edited Nov 25 2008Hi,
What is the difference between InvalidParameterException and IllegalArgumentException? As I understood from the Java documentation, IllegalArumentException is the one, that can be used for validating the arguments to a method. However the InvalidParameterException which extends from IllegalArugmentException is used in the java.security package as per the Java documentation, but this too for the parameter validation to a method. Then, what is the need for a special exception in the security package with the same meaning? Anyway, IllegalArgumentException is also used at some places in the secuity package. So when to use an IllegalArugmentException and when to use an InvalidParameterException is not clear. Somebody please put some light to this.
Regards,
Thomas.