private static boolean containsNonSerializableException(Exception e) {
    if (e == null) {
      return false;
    }

    if (e instanceof SQLException) {
      return true;
    }

    Throwable cause = e.getCause();
    while (cause != null) {
      if (cause instanceof SQLException) {
        return true;
      }
      cause = cause.getCause();
    }
    return false;
  }
Create a new JdbcConnectorException by first checking to see if the causing exception is or
contains an exception that potentially could not be deserialized by remote systems receiving
the serialized exception.

@param message message of this Exception
@param e cause of this Exception
@return a new JdbcConnectorException containing either the causing exception, if it can be
        serialized/deserialized by Geode, or containing the causing exception stack trace in
        its message if not
geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JdbcConnectorException.java