public static KeeperException create()

in zookeeper-server/src/main/java/org/apache/zookeeper/KeeperException.java [92:158]


    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 NEWCONFIGNOQUORUM:
            return new NewConfigNoQuorum();
        case RECONFIGINPROGRESS:
            return new ReconfigInProgress();
        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 EPHEMERALONLOCALSESSION:
            return new EphemeralOnLocalSessionException();
        case NOWATCHER:
            return new NoWatcherException();
        case RECONFIGDISABLED:
            return new ReconfigDisabledException();
        case SESSIONCLOSEDREQUIRESASLAUTH:
            return new SessionClosedRequireAuthException();
        case REQUESTTIMEOUT:
            return new RequestTimeoutException();
        case QUOTAEXCEEDED:
            return new QuotaExceededException();
        case THROTTLEDOP:
            return new ThrottledOpException();
        case OK:
        default:
            throw new IllegalArgumentException("Invalid exception code:" + code.code);
        }
    }