Split out the code that renders a route to a response into its own function

You can now use this to simplify rendering routes elsewhere (e.g. exception handlers) by calling kernel->forwardToRoute()