@Provider public class FooExceptionMapper extends Object implements ExceptionMapper<FooException>
Constructor and Description |
---|
FooExceptionMapper(Application application,
javax.servlet.ServletConfig servletConfig,
javax.servlet.ServletContext context) |
public FooExceptionMapper(@Context Application application, @Context javax.servlet.ServletConfig servletConfig, @Context javax.servlet.ServletContext context)
public Response toResponse(FooException exception)
ExceptionMapper
Response
. Returning
null
results in a Response.Status.NO_CONTENT
response. Throwing a runtime exception results in a
Response.Status.INTERNAL_SERVER_ERROR
response.toResponse
in interface ExceptionMapper<FooException>
exception
- the exception to map to a response.Copyright © 2015. All Rights Reserved.