checkArgument

fun checkArgument(expression: Boolean, errorMessage: Any)

Ensures that an expression checking an argument is true.

Parameters

expression

the expression to check

errorMessage

the exception message to use if the check fails; will be converted to a string using toString

Throws

if expression is false