code: public static SessionInitializationException fromThrowable(Throwable cause) {
      return (cause instanceof SessionInitializationException)
                     ? (SessionInitializationException) cause
                     : new SessionInitializationException(cause);
    }
docs: Converts a Throwable to a SessionInitializationException. If the Throwable is a
  SessionInitializationException, it will be passed through unmodified; otherwise, it will be wrapped
  in a new SessionInitializationException.
  
  @param cause the Throwable to convert
  
  @return a SessionInitializationException