Glossary: Kotlin Beyond the Basics
require and check
Also written: require, check
Functions that throw if a condition is false: `require` throws `IllegalArgumentException` (bad input) and `check` throws `IllegalStateException`.
Glossary: Kotlin Beyond the Basics
Also written: require, check
Functions that throw if a condition is false: `require` throws `IllegalArgumentException` (bad input) and `check` throws `IllegalStateException`.