public void handleCause() {
    Throwable c = getCause();
    if (c == null) {
      throw new InternalGemFireException(
          String.format("unexpected exception on member %s",
              getSender()),
          this);
    }
    if (c instanceof RuntimeException) {
      fixUpRemoteEx(c);
      throw (RuntimeException) c;
    }
    if (c instanceof Error) {
      fixUpRemoteEx(c);
      throw (Error) c;
    }
    if (c instanceof ClassNotFoundException) {
      // for bug 43602
      throw new SerializationException("Class not found", c);
    }
    throw new InternalGemFireException(
        String.format("unexpected exception on member %s",
            getSender()),
        c);
  }
Before calling this method any expected "checked" causes should be handled by the caller. If
cause is null or a checked exception (that is not ClassNotFound) then throw an
InternalGemFireException because those should have already been handled. Otherwise
ClassNotFoundException will be handled by throwing SerializationException. RuntimeException and
Error will have their stack fixed up and then are thrown.
geode-core/src/main/java/org/apache/geode/distributed/internal/ReplyException.java