static RVVException createException(long previousVersion, long nextVersion,
      long initialExceptionCount) {
    // arbitrary cutoff of 100 bytes to use a treeSet instead of bitSet
    // But if we are deserializing an exception too many received versions use a
    // bitset anyway.
    long delta = nextVersion - previousVersion;
    if (UseTreeSetsForTesting
        || (delta > RVV_MAX_BITSET_SPAN && initialExceptionCount * 512 < delta)) {
      return new RVVExceptionT(previousVersion, nextVersion);
    }
    return new RVVExceptionB(previousVersion, nextVersion);
  }
Use this method to create a new RVVException
geode-core/src/main/java/org/apache/geode/internal/cache/versions/RVVException.java