Interface ExceptionThrower

    • Method Detail

      • throwIfActive

        default <T extends Exception> void throwIfActive​(T exceptionToThrowOrSwallow)
                                                  throws T extends Exception
        Throws the passed Exception if this exception thrower is of active type.

        Otherwise, the passed Exception is swallowed, i.e. the call of this method has no effects.

        Type Parameters:
        T - type of the passed exception
        Parameters:
        exceptionToThrowOrSwallow - exception to be thrown or swallowed
        Throws:
        T - if this exception thrower is of active type
        UnsupportedOperationException - if this method hasn't been implemented by this exception thrower
        T extends Exception