Class XMLFailureRenderer
java.lang.Object
com.peterphi.std.guice.web.rest.jaxrs.exception.XMLFailureRenderer
- All Implemented Interfaces:
RestFailureRenderer
- Direct Known Subclasses:
CustomTemplateFailureRenderer,HTMLFailureRenderer
A simple renderer that renders an XML form of the RestFailure object by letting the JAX-RS implementation serialise it
Sets the X-Rich-Exception flag so that our code can understand and intelligently reconstruct an exception client-side
Sets the X-Rich-Exception flag so that our code can understand and intelligently reconstruct an exception client-side
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanbooleanboolean -
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
-
includeStackTrace
@Inject(optional=true) public boolean includeStackTrace -
stackTraceRequiresLoggedIn
@Inject(optional=true) public boolean stackTraceRequiresLoggedIn -
stackTraceWhenLoggedInRequiresAdminOrService
@Inject(optional=true) public boolean stackTraceWhenLoggedInRequiresAdminOrService
-
-
Constructor Details
-
XMLFailureRenderer
public XMLFailureRenderer()
-
-
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- Returns:
- a non-null Response if desired - otherwise (or if this method throws) the default exeption renderer will be used
-