Concept Flow - Preconditions (require, check, error)
Start Function
Check require(condition)
Throw IllegalArgumentException
Check check(condition)
Throw IllegalStateException
Call error(message)
Throw IllegalStateException
Continue Execution
The function starts by checking conditions with require and check. If conditions fail, exceptions are thrown. error always throws an exception immediately.