Class ExceptionHandler

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

    @Provider
    public class ExceptionHandler
    extends Object
    implements javax.ws.rs.ext.ExceptionMapper<Exception>
    Simple error handler to give back a user-readable status, and log it to the console.

    This is a convenience for trouble-shouting.

    • Constructor Detail

      • ExceptionHandler

        public ExceptionHandler()
    • Method Detail

      • toResponse

        public javax.ws.rs.core.Response toResponse​(Exception e)
        Specified by:
        toResponse in interface javax.ws.rs.ext.ExceptionMapper<Exception>