Interface ExceptionHandler<E extends java.lang.Throwable>

    • Field Detail

      • NOOP

        static final ExceptionHandler<java.lang.Throwable> NOOP
        A ExceptionHandler that does nothing. This is useful when you want to ignore an exception of a specific type silently.
      • CLOSE

        static final ExceptionHandler<java.lang.Throwable> CLOSE
        A ExceptionHandler that closes the session immediately. This is useful when you want to close the session when an exception of a specific type is raised.
    • Method Detail

      • exceptionCaught

        void exceptionCaught​(IoSession session,
                             E cause)
                      throws java.lang.Exception
        Invoked when the specific type of exception is caught from the specified session.
        Parameters:
        session - The current session
        cause - the exception's cause
        Throws:
        java.lang.Exception - If we can't process the event