src/precore/util/Exceptions.php
public static function propagateIfInstanceOf(Exception $exception, string $exceptionClass) : void
    {
        if (is_a($exception, $exceptionClass)) {
            throw $exception;
        }
    }
public static function propagateIfInstanceOf(Exception $exception, string $exceptionClass) : void
    {
        if (is_a($exception, $exceptionClass)) {
            throw $exception;
        }
    }
Propagates throwable exactly as-is, if and only if it is an instance of exceptionClass.

@param Exception $exception
@param string $exceptionClass
@throws Exception the given $exception