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.
  • Constructor Details

    • CustomTemplateFailureRenderer

      public CustomTemplateFailureRenderer()
  • Method Details

    • render

      public javax.ws.rs.core.Response render(RestFailure failure)
      Description copied from interface: RestFailureRenderer
      Allows user-defined code to present the exception in a more user-friendly manner
      Specified by:
      render in interface RestFailureRenderer
      Overrides:
      render in class XMLFailureRenderer
      Returns:
      a non-null Response if desired - otherwise (or if this method throws) the default exeption renderer will be used