public Set<InternalDistributedMember> waitForCacheOrQueryException()
        throws CacheException, QueryException {
      try {
        waitForRepliesUninterruptibly();
        return failedMembers;
      } catch (ReplyException e) {
        Throwable t = e.getCause();
        if (t instanceof CacheException) {
          throw (CacheException) t;
        } else if (t instanceof RegionDestroyedException) {
          throw (RegionDestroyedException) t;
        } else if (t instanceof QueryException) {
          throw (QueryException) t;
        } else if (t instanceof PrimaryBucketException) {
          throw new PrimaryBucketException("Peer failed primary test", t);
        }
        e.handleCause();
        // This won't be reached, because of the above,
        // but it makes the compiler happy.
        throw e;
      }
    }
Waits for the response from the {@link PartitionMessage}'s recipient

@throws CacheException if the recipient threw a cache exception during message processing
@throws QueryException if the recipient threw a query exception
@throws RegionDestroyedException if the peer has closed its copy of the region
@return The set of members that failed.
geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/StreamingPartitionOperation.java