Class HtmlErrorFormatter

java.lang.Object
net.targetr.wtm3.util.HtmlErrorFormatter
Direct Known Subclasses:
EnhancedErrorFormatter

public class HtmlErrorFormatter extends Object
Formats error responses as HTML documents.
  • Constructor Details

    • HtmlErrorFormatter

      public HtmlErrorFormatter()
      Creates a new HtmlErrorFormatter.
  • Method Details

    • formatError

      public String formatError(HttpRequest httpReq, HttpResponse httpRes, int code, String info, String details, Throwable t)
      Formats an error response as an HTML page.
      Parameters:
      httpReq - The HTTP request.
      httpRes - The HTTP response.
      code - The HTTP status code.
      info - The HTTP status message.
      details - Additional details about the error.
      t - The exception to use to display stack trace.
      Returns:
      The formatted HTML page.