Class HTMLFailureRenderer
java.lang.Object
com.peterphi.std.guice.web.rest.jaxrs.exception.XMLFailureRenderer
com.peterphi.std.guice.web.rest.jaxrs.exception.HTMLFailureRenderer
- All Implemented Interfaces:
RestFailureRenderer
A HTML renderer that will only emit HTML when the caller lists text/html as their primary Accept header value
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected StringA comma-delimited list of terms that identify highlightable stack trace lines)protected booleanIf true, a "Create Issue" link will be availableprotected Stringprotected intprotected intIf non-zero we will try to create and populate an Issue automaticallyprotected booleanprotected booleanprotected booleanprotected booleanprotected Stringprotected booleanFields inherited from class com.peterphi.std.guice.web.rest.jaxrs.exception.XMLFailureRenderer
includeStackTrace, stackTraceRequiresLoggedIn, stackTraceWhenLoggedInRequiresAdminOrService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Responserender(RestFailure failure) Allows user-defined code to present the exception in a more user-friendly mannerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.peterphi.std.guice.web.rest.jaxrs.exception.RestFailureRenderer
shouldSuppressLog
-
Field Details
-
highlightTerms
A comma-delimited list of terms that identify highlightable stack trace lines) -
highlightEnabled
@Inject(optional=true) protected boolean highlightEnabled -
enabled
@Inject(optional=true) protected boolean enabled -
requireLoggedIn
@Inject(optional=true) protected boolean requireLoggedIn -
requireRole
-
jvmInfoEnabled
@Inject(optional=true) protected boolean jvmInfoEnabled -
jvmInfoEnvironmentVariablesEnabled
@Inject(optional=true) protected boolean jvmInfoEnvironmentVariablesEnabled -
requestInfoEnabled
@Inject(optional=true) protected boolean requestInfoEnabled -
stackTraceEnabled
@Inject(optional=true) protected boolean stackTraceEnabled -
jiraEnabled
@Inject(optional=true) protected boolean jiraEnabledIf true, a "Create Issue" link will be available -
jiraProjectId
@Inject(optional=true) protected int jiraProjectIdIf non-zero we will try to create and populate an Issue automatically -
jiraIssueType
@Inject(optional=true) protected int jiraIssueType -
jiraEndpoint
-
-
Constructor Details
-
HTMLFailureRenderer
public HTMLFailureRenderer()
-
-
Method Details
-
render
Description copied from interface:RestFailureRendererAllows user-defined code to present the exception in a more user-friendly manner- Specified by:
renderin interfaceRestFailureRenderer- Overrides:
renderin classXMLFailureRenderer- Returns:
- a non-null Response if desired - otherwise (or if this method throws) the default exeption renderer will be used
-