Class JAXRSExceptionMapper

java.lang.Object
com.peterphi.std.guice.web.rest.jaxrs.exception.JAXRSExceptionMapper
All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<org.jboss.resteasy.spi.ApplicationException>

@Provider public class JAXRSExceptionMapper extends Object implements javax.ws.rs.ext.ExceptionMapper<org.jboss.resteasy.spi.ApplicationException>
Takes an Exception thrown by a JAX-RS provider and renders it prettily
  • Constructor Details

    • JAXRSExceptionMapper

      public JAXRSExceptionMapper()
  • Method Details

    • toResponse

      public javax.ws.rs.core.Response toResponse(org.jboss.resteasy.spi.ApplicationException exception)
      Specified by:
      toResponse in interface javax.ws.rs.ext.ExceptionMapper<org.jboss.resteasy.spi.ApplicationException>
    • getResponse

      public javax.ws.rs.core.Response getResponse(Throwable exception)