code: public static function propagateIfInstanceOf(Exception $exception, string $exceptionClass) : void
      {
          if (is_a($exception, $exceptionClass)) {
              throw $exception;
          }
      }
docs: 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