exception

inline fun <TThrowable : Throwable> exception(status: HttpStatusCode)(source)

Registers a handler for exception type TThrowable and returns a status page


inline fun <TThrowable : Throwable, TResponse> exception(status: HttpStatusCode, example: TResponse? = null, noinline gen: (TThrowable) -> TResponse)(source)

Registers a handler for exception type TThrowable and returns a status page that includes a response body of type TResponse.

Parameters

example

An example of the response body

gen

handler for TThrowable that should return an instance of TResponse