code: public static SessionServiceException fromThrowable(Class interfaceClass, String message, Throwable cause) {
      return (cause instanceof SessionServiceException 
              && Objects.equals(interfaceClass, ((SessionServiceException) cause).getInterfaceClass())
              && Objects.equals(message, cause.getMessage()))
                     ? (SessionServiceException) cause
                     : new SessionServiceException(interfaceClass, message, cause);
    }
docs: Converts a Throwable to a SessionServiceException with the specified detail message. If the
  Throwable is a SessionServiceException and if the Throwable's message is identical to the
  one supplied, the Throwable will be passed through unmodified; otherwise, it will be wrapped in
  a new SessionServiceException with the detail message.
  
  @param cause       the Throwable to convert
  @param interfaceClass
  @param message the specified detail message
  
  @return a SessionServiceException