Class CustomTemplateFailureRenderer
java.lang.Object
com.peterphi.std.guice.web.rest.jaxrs.exception.XMLFailureRenderer
com.peterphi.std.guice.web.rest.jaxrs.exception.CustomTemplateFailureRenderer
- All Implemented Interfaces:
RestFailureRenderer
public class CustomTemplateFailureRenderer
extends XMLFailureRenderer
implements RestFailureRenderer
A RestFailureRenderer that uses the configured templating engine to render exceptions destined for humans.
-
Field Summary
Fields inherited from class com.peterphi.std.guice.web.rest.jaxrs.exception.XMLFailureRenderer
includeStackTrace, stackTraceRequiresLoggedIn, stackTraceWhenLoggedInRequiresAdminOrService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
render
(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, wait
Methods inherited from interface com.peterphi.std.guice.web.rest.jaxrs.exception.RestFailureRenderer
shouldSuppressLog
-
Constructor Details
-
CustomTemplateFailureRenderer
public CustomTemplateFailureRenderer()
-
-
Method Details
-
render
Description copied from interface:RestFailureRenderer
Allows user-defined code to present the exception in a more user-friendly manner- Specified by:
render
in interfaceRestFailureRenderer
- Overrides:
render
in classXMLFailureRenderer
- Returns:
- a non-null Response if desired - otherwise (or if this method throws) the default exeption renderer will be used
-