java · java/IllegalArgumentException
IllegalArgumentException
IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or inappropriate argument. Use this in your own code to validate parameters.
Also defined in
- kotlin IllegalArgumentException Thrown when a function receives an argument that violates its contract. Also thrown by the require() and requireNotNull() standard library functions.
- scala IllegalArgumentException Thrown when a method receives an argument that violates its precondition. In Scala, require(condition, message) is the idiomatic way to validate arguments and throws IllegalArgumentException when the condition is false.