Class ExceptionThrowerVoid

    • Constructor Detail

    • Method Detail

      • throwIfActive

        public <T extends Exception> void throwIfActive​(@Nullable
                                                        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.

        Specified by:
        throwIfActive in interface ExceptionThrower
        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
        T extends Exception