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