Class UnhandledExceptionHandler

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

    @Provider
    public class UnhandledExceptionHandler
    extends Object
    implements javax.ws.rs.ext.ExceptionMapper<Exception>
    This exception handler should handle all runtime exceptions. It should prevent server from returning HTML Error page with stack trace and internals of error.
    Author:
    David Klingenberg, Ondrej Zizka
    • Constructor Detail

      • UnhandledExceptionHandler

        public UnhandledExceptionHandler()
    • Method Detail

      • toResponse

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