public class UniversalExceptionMapper extends Object
Supports both, JAX-RS responses and Servlet API responses.
2 additional aspects are handled: - Logging the exception. - Enriching the response with an error entity.
| Constructor and Description |
|---|
UniversalExceptionMapper(Throwable e,
javax.servlet.http.HttpServletRequest request) |
| Modifier and Type | Method and Description |
|---|---|
void |
initResponse(javax.servlet.http.HttpServletResponse response) |
javax.ws.rs.core.Response |
toResponse() |
public UniversalExceptionMapper(Throwable e, javax.servlet.http.HttpServletRequest request)
public javax.ws.rs.core.Response toResponse()
public void initResponse(javax.servlet.http.HttpServletResponse response)
throws IOException
IOExceptionCopyright © 2018. All rights reserved.