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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
getResponse
(Throwable exception) javax.ws.rs.core.Response
toResponse
(org.jboss.resteasy.spi.ApplicationException exception)
-
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 interfacejavax.ws.rs.ext.ExceptionMapper<org.jboss.resteasy.spi.ApplicationException>
-
getResponse
-