Package javax.ws.rs.ext
Interface ExceptionMapper<E extends java.lang.Throwable>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Response
toResponse(E exception)
Map an exception to aResponse
.
-
-
-
Method Detail
-
toResponse
Response toResponse(E exception)
Map an exception to aResponse
. Returningnull
results in aResponse.Status.NO_CONTENT
response. Throwing a runtime exception results in aResponse.Status.INTERNAL_SERVER_ERROR
response- Parameters:
exception
- the exception to map to a response- Returns:
- a response mapped from the supplied exception
-
-