Package net.targetr.wtm3.util
Class HtmlErrorFormatter
java.lang.Object
net.targetr.wtm3.util.HtmlErrorFormatter
- Direct Known Subclasses:
EnhancedErrorFormatter
Formats error responses as HTML documents.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformatError(HttpRequest httpReq, HttpResponse httpRes, int code, String info, String details, Throwable t) Formats an error response as an HTML page.
-
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.
-