de.deepamehta.plugins.webservice.provider
Class CatchAllExceptionMapper
java.lang.Object
de.deepamehta.plugins.webservice.provider.CatchAllExceptionMapper
- All Implemented Interfaces:
- javax.ws.rs.ext.ExceptionMapper<Throwable>
@Provider
public class CatchAllExceptionMapper
- extends Object
- implements javax.ws.rs.ext.ExceptionMapper<Throwable>
Maps all Throwables but WebApplicationExceptions to a 500 (Internal Server Error) response.
A WebApplicationException's response is returned directly.
We don't want Jersey to re-throw anything to the HTTP container as this would result in logging
the exception twice and possibly to interspersed illegible stack traces (see #484).
Field Summary |
private Logger |
logger
|
(package private) javax.servlet.http.HttpServletRequest |
request
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
request
@Context
javax.servlet.http.HttpServletRequest request
logger
private Logger logger
CatchAllExceptionMapper
public CatchAllExceptionMapper()
toResponse
public javax.ws.rs.core.Response toResponse(Throwable e)
- Specified by:
toResponse
in interface javax.ws.rs.ext.ExceptionMapper<Throwable>
hasNestedAccessControlException
private boolean hasNestedAccessControlException(Throwable e)
errorMessage
private String errorMessage(javax.ws.rs.core.Response.Status status)
Copyright © 2015. All Rights Reserved.