package dp.kotul.templategroupsbackend.util

import dp.kotul.templategroupsbackend.exception.WrongTemplateGroupSetupException

fun <T> Iterable<T>.firstOrWrongTemplateGroupSetupException(predicate: (T) -> Boolean): T {
    return firstOrNull(predicate) ?: throw WrongTemplateGroupSetupException()
}
