This extension function removes the need for the c...
# ktor
a
This extension function removes the need for the cast - I guess it would be nice to change signature of the
exception
method along similar lines:
Copy code
@Suppress("UNCHECKED_CAST")
inline fun <reified T : Throwable> StatusPages.Configuration.throwable(noinline handler: PipelineContext<ApplicationCall>.(T) -> Unit) =
        exception(T::class.java, handler as PipelineContext<ApplicationCall>.(Throwable) -> Unit)