Package org.kiwiproject.jaxrs.exception
Class IllegalStateExceptionMapper
- java.lang.Object
-
- org.kiwiproject.jaxrs.exception.IllegalStateExceptionMapper
-
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<IllegalStateException>
@Provider public class IllegalStateExceptionMapper extends Object implements javax.ws.rs.ext.ExceptionMapper<IllegalStateException>
MapIllegalStateExceptiontoResponse.The mapped response has status code 500 (Bad Request) and media type JSON.
-
-
Constructor Summary
Constructors Constructor Description IllegalStateExceptionMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsetoResponse(IllegalStateException exception)Convert the givenIllegalStateExceptionto a 500 Internal Server Error response containing a JSON entity.
-
-
-
Method Detail
-
toResponse
public javax.ws.rs.core.Response toResponse(IllegalStateException exception)
Convert the givenIllegalStateExceptionto a 500 Internal Server Error response containing a JSON entity.- Specified by:
toResponsein interfacejavax.ws.rs.ext.ExceptionMapper<IllegalStateException>- Parameters:
exception- the exception to convert- Returns:
- a response
- See Also:
JaxrsExceptionMapper.buildResponse(JaxrsException)
-
-