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