@Provider public class JaxRsExceptionMapper extends AbstractExceptionMapper<JaxRsExceptionMapper> implements javax.ws.rs.ext.ExceptionMapper<Throwable>
ExceptionMapper
mechanic.
This handler catches all Throwable
s, logs them on the server side, and fills the response with the status
code and error description. To change/override this behavior either use the methods defined in the
AbstractExceptionMapper
, or write a custom ExceptionMapper
with the Provider
higher then the
default one.
Note that CloudLoggerFactory
is not used here to avoid recursion.
Constructor and Description |
---|
JaxRsExceptionMapper()
Default constructor, adding the handling of additional JAX-RS
Exception s. |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
toResponse(Throwable exception) |
getResponseBuilder, logAsError, logAsInfo, logAsLevel, logAsWarning, removeMapping, withMapper, withMapper
Copyright © 2018 SAP SE. All rights reserved.