class WatcherException extends Exception {
  private final String rawWatchMessage;

  public WatcherException(String message, Throwable cause) {
    this(message, cause, null);
  }

  public WatcherException(String message) {
    super(message);
    rawWatchMessage = null;
  }

  public WatcherException(String message, Throwable cause, String rawWatchMessage) {
    super(message, cause);
    this.rawWatchMessage = rawWatchMessage;
  }

  public KubernetesClientException asClientException() {
    final Throwable cause = getCause();
    return cause instanceof KubernetesClientException ? (KubernetesClientException) cause
        : new KubernetesClientException(getMessage(), cause);
  }

  public boolean isHttpGone() {<FILL_FUNCTION_BODY>}

  @SuppressWarnings("unused")
  public Optional<String> getRawWatchMessage() {
    return Optional.ofNullable(rawWatchMessage);
  }
}

    final KubernetesClientException cause = asClientException();
    return cause != null && (cause.getCode() == HttpURLConnection.HTTP_GONE
        || (cause.getStatus() != null && cause.getStatus().getCode() == HttpURLConnection.HTTP_GONE));
  
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.Throwable) ,public void <init>(java.lang.String, java.lang.Throwable) <variables>static final long serialVersionUID