dave
then()
object CatchAll { operator fun invoke(errorStatus: Status = INTERNAL_SERVER_ERROR): Filter = Filter { next -> { try { next(it) } catch (e: Exception) { val sw = StringWriter() e.printStackTrace(PrintWriter(sw)) Response(errorStatus).body(sw.toString()) } } } }
krtko
A modern programming language that makes developers happier.