Class ExceptionErrorPage

    • Constructor Detail

      • ExceptionErrorPage

        public ExceptionErrorPage​(Throwable throwable,
                                  Page page)
        Constructor.
        Parameters:
        throwable - The exception to show
        page - The page being rendered when the exception was thrown
    • Method Detail

      • getErrorMessage

        public String getErrorMessage​(Throwable throwable)
        Converts a Throwable to a string.
        Parameters:
        throwable - The throwable
        Returns:
        The string
      • getStackTrace

        public String getStackTrace​(Throwable throwable)
        Converts a Throwable to a string.
        Parameters:
        throwable - The throwable
        Returns:
        The string
      • setHeaders

        protected void setHeaders​(WebResponse response)
        Description copied from class: WebPage
        Subclasses can override this to set there headers when the Page is being served. By default these headers are set:
         response.setHeader("Date", "[now]");
         response.setHeader("Expires", "[0]");
         response.setHeader("Pragma", "no-cache");
         response.setHeader("Cache-Control", "no-cache");
         
        So if a Page wants to control this or doesn't want to set this info it should override this method and don't call super.
        Overrides:
        setHeaders in class WebPage
        Parameters:
        response - The WebResponse where set(Date)Header can be called on.