Class WebApplicationExceptionMapper

  • All Implemented Interfaces:
    javax.ws.rs.ext.ExceptionMapper<javax.ws.rs.WebApplicationException>

    @Provider
    public class WebApplicationExceptionMapper
    extends AbstractExceptionMapper<javax.ws.rs.WebApplicationException>
    Map WebApplicationException so that it always expose a ResponseErrorObject entity.
    Author:
    poirigui
    • Constructor Detail

      • WebApplicationExceptionMapper

        public WebApplicationExceptionMapper()
    • Method Detail

      • logException

        protected boolean logException​(javax.ws.rs.WebApplicationException e)
        Description copied from class: AbstractExceptionMapper
        Indicate if the given exception should be logged.
        Overrides:
        logException in class AbstractExceptionMapper<javax.ws.rs.WebApplicationException>
      • getStatus

        protected javax.ws.rs.core.Response.Status getStatus​(javax.ws.rs.WebApplicationException exception)
        Description copied from class: AbstractExceptionMapper
        Translate the exception to an HTTP Response.Status.
        Specified by:
        getStatus in class AbstractExceptionMapper<javax.ws.rs.WebApplicationException>
      • getResponseBuilder

        protected javax.ws.rs.core.Response.ResponseBuilder getResponseBuilder​(javax.ws.rs.WebApplicationException exception)
        Overrides:
        getResponseBuilder in class AbstractExceptionMapper<javax.ws.rs.WebApplicationException>