java.io.SerializableKeeperException.APIErrorException, KeeperException.AuthFailedException, KeeperException.BadArgumentsException, KeeperException.BadVersionException, KeeperException.ConnectionLossException, KeeperException.DataInconsistencyException, KeeperException.InvalidACLException, KeeperException.InvalidCallbackException, KeeperException.MarshallingErrorException, KeeperException.NoAuthException, KeeperException.NoChildrenForEphemeralsException, KeeperException.NodeExistsException, KeeperException.NoNodeException, KeeperException.NotEmptyException, KeeperException.NotReadOnlyException, KeeperException.OperationTimeoutException, KeeperException.RuntimeInconsistencyException, KeeperException.SessionExpiredException, KeeperException.SessionMovedException, KeeperException.SystemErrorException, KeeperException.UnimplementedException@Public public abstract class KeeperException extends java.lang.Exception
| Constructor | Description |
|---|---|
KeeperException(KeeperException.Code code) |
| Modifier and Type | Method | Description |
|---|---|---|
KeeperException.Code |
code() |
Read the error Code for this exception
|
static KeeperException |
create(int code) |
Deprecated.
deprecated in 3.1.0, use
create(Code)
instead |
static KeeperException |
create(int code,
java.lang.String path) |
Deprecated.
deprecated in 3.1.0, use
create(Code, String)
instead |
static KeeperException |
create(KeeperException.Code code) |
All non-specific keeper exceptions should be constructed via
this factory method in order to guarantee consistency in error
codes and such.
|
static KeeperException |
create(KeeperException.Code code,
java.lang.String path) |
All non-specific keeper exceptions should be constructed via
this factory method in order to guarantee consistency in error
codes and such.
|
int |
getCode() |
Deprecated.
deprecated in 3.1.0, use
code() instead |
java.lang.String |
getMessage() |
|
java.lang.String |
getPath() |
Read the path for this exception
|
java.util.List<OpResult> |
getResults() |
If this exception was thrown by a multi-request then the (partial) results
and error codes can be retrieved using this getter.
|
void |
setCode(int code) |
Deprecated.
deprecated in 3.1.0, exceptions should be immutable, this
method should not be used
|
public KeeperException(KeeperException.Code code)
public static KeeperException create(KeeperException.Code code, java.lang.String path)
code - The error code.path - The ZooKeeper path being operated on.@Deprecated public static KeeperException create(int code, java.lang.String path)
create(Code, String)
instead@Deprecated public static KeeperException create(int code)
create(Code)
insteadpublic static KeeperException create(KeeperException.Code code)
code - The error code of your new exception. This will
also determine the specific type of the exception that is
returned.@Deprecated public void setCode(int code)
code - error code@Deprecated public int getCode()
code() insteadpublic KeeperException.Code code()
public java.lang.String getPath()
public java.lang.String getMessage()
getMessage in class java.lang.Throwablepublic java.util.List<OpResult> getResults()
Copyright © 2018 The Apache Software Foundation