public static KeeperException create()

in kyuubi-relocated-zookeeper-parent/kyuubi-relocated-zookeeper-34/src/main/java/org/apache/zookeeper/KeeperException.java [74:123]


  public static KeeperException create(Code code) {
    switch (code) {
      case SYSTEMERROR:
        return new SystemErrorException();
      case RUNTIMEINCONSISTENCY:
        return new RuntimeInconsistencyException();
      case DATAINCONSISTENCY:
        return new DataInconsistencyException();
      case CONNECTIONLOSS:
        return new ConnectionLossException();
      case MARSHALLINGERROR:
        return new MarshallingErrorException();
      case UNIMPLEMENTED:
        return new UnimplementedException();
      case OPERATIONTIMEOUT:
        return new OperationTimeoutException();
      case BADARGUMENTS:
        return new BadArgumentsException();
      case APIERROR:
        return new APIErrorException();
      case NONODE:
        return new NoNodeException();
      case NOAUTH:
        return new NoAuthException();
      case BADVERSION:
        return new BadVersionException();
      case NOCHILDRENFOREPHEMERALS:
        return new NoChildrenForEphemeralsException();
      case NODEEXISTS:
        return new NodeExistsException();
      case INVALIDACL:
        return new InvalidACLException();
      case AUTHFAILED:
        return new AuthFailedException();
      case NOTEMPTY:
        return new NotEmptyException();
      case SESSIONEXPIRED:
        return new SessionExpiredException();
      case INVALIDCALLBACK:
        return new InvalidCallbackException();
      case SESSIONMOVED:
        return new SessionMovedException();
      case NOTREADONLY:
        return new NotReadOnlyException();

      case OK:
      default:
        throw new IllegalArgumentException("Invalid exception code:" + code.code);
    }
  }