com.hexagonkt.http.handlers.ExceptionHandler.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http_handlers Show documentation
Show all versions of http_handlers Show documentation
HTTP handlers used to apply many callbacks to HTTP calls.
package com.hexagonkt.http.handlers
import com.hexagonkt.handlers.ExceptionHandler
import com.hexagonkt.handlers.Handler
import com.hexagonkt.http.model.HttpCall
import kotlin.reflect.KClass
data class ExceptionHandler(
val exception: KClass,
val clear: Boolean = true,
val block: HttpExceptionCallbackType
) : HttpHandler, Handler by ExceptionHandler(exception, clear, toCallback(block)) {
override val handlerPredicate: HttpPredicate = HttpPredicate()
override fun addPrefix(prefix: String): HttpHandler =
this
}