All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hexagonkt.http.handlers.ExceptionHandler.kt Maven / Gradle / Ivy

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
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy