// TODO Pretty print the exception and stack trace, request information, etc
// TODO can this exception be handled by middleware? middleware is not really avaliable here as it is handled in the requestProcessor...
if (!injector.getInstance(Settings.class).isDebug()) {
HttpResponse response = new SimpleHttpResponse("Unrecoverable error, please contact support");
try {
response.render(servletRequest, servletResponse);
} catch (HttpException e2) {
log.error(e2,e2);
throw new ServletException(e);
}
} else {