Class GenericExceptionMapper

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

    public class GenericExceptionMapper
    extends Object
    implements javax.ws.rs.ext.ExceptionMapper<Throwable>
    See http://www.codingpedia.org/ama/error-handling-in-rest-api-with-jersey/
    Author:
    Ulrich Mann
    • Constructor Detail

      • GenericExceptionMapper

        public GenericExceptionMapper()
    • Method Detail

      • toResponse

        @Produces("application/json")
        public javax.ws.rs.core.Response toResponse​(Throwable ex)
        Specified by:
        toResponse in interface javax.ws.rs.ext.ExceptionMapper<Throwable>