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