Christopher Hübner
12/30/2023, 6:59 AMsuspend fun T : Any fail(context: PipelineContextUnit, ApplicationCall): T? {
return try {
context.call.receiveT()
} catch (ex: ContentTransformationException) {
null
}
}
Cannot use T as refined parameter. Use class instead.
Why? Would be helpful not try catching any time reseiving a parameter from body, but just once in an local inline function.Shawn
12/31/2023, 12:56 AMfail() a suspend inline fun and make the type parameter reified T : Any