jakub.dyszkiewicz
11/11/2018, 8:57 AMclass ErrorHandlers(vararg handlers: Pair<KClass<Exception>, (e: Exception) -> Int>)
fun handleIAE(e: IllegalArgumentException): Int = 500
fun handleRE(e: RuntimeException): Int = 500
val y = ErrorHandlers(
IllegalArgumentException::class to ::handleIAE,
RuntimeException::class to ::handleRE)