julienviet
10/06/2017, 11:02 AMfun Route.coroutineHandler(fn : suspend (RoutingContext) -> Unit) {
handler { ctx ->
launch(ctx.vertx().dispatcher()) {
try {
fn(ctx)
} catch(e: Exception) {
ctx.fail(e)
}
}
}
}