Hi, any ideas how to get it to work? I can’t get t...
# getting-started
j
Hi, any ideas how to get it to work? I can’t get the generics right 😕
Copy code
class 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)