code: protected void onUncaughtException(HttpServletRequest request, HttpServletResponse response, RuntimeException error) throws IOException {
          response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
          response.getWriter().print(__getStackTrace(error));
      }
docs: Called if an uncaught error was detected while processing given request.
  Default implementation just sends a
  {@linkplain HttpServletResponse#SC_INTERNAL_SERVER_ERROR} status and the
  error stack trace embedded in response body.
  
  @param request HTTP request.
  @param response HTTP response.
  @param error uncaught error.
  @throws IOException