LOGGER.info("Had an undefined error: " + t.getMessage());
//TODO: put the stack trace in the logger.
//t.printStackTrace();
//String pre = "UNCAUGHT EXCEPTION";
ExceptionHandler exHandler = getExceptionHandler();
ServiceException se = exHandler.newServiceException(t);
sendError(response, se);
//GeoServer geoServer = (GeoServer) this.getServletConfig()
// .getServletContext().getAttribute(GeoServer.WEB_CONTAINER_KEY);