public enum ErrorCode extends Enum<ErrorCode>
SpannerException.getErrorCode()
.Enum Constant and Description |
---|
ABORTED |
ALREADY_EXISTS |
CANCELLED |
DATA_LOSS |
DEADLINE_EXCEEDED |
FAILED_PRECONDITION |
INTERNAL |
INVALID_ARGUMENT |
NOT_FOUND |
OUT_OF_RANGE |
PERMISSION_DENIED |
RESOURCE_EXHAUSTED |
UNAUTHENTICATED |
UNAVAILABLE |
UNIMPLEMENTED |
UNKNOWN |
Modifier and Type | Method and Description |
---|---|
static ErrorCode |
fromGrpcStatus(Status status)
Returns the error code corresponding to a gRPC status, or
UNKNOWN if not recognized. |
Status.Code |
getGrpcStatusCode() |
static ErrorCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ErrorCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ErrorCode CANCELLED
public static final ErrorCode UNKNOWN
public static final ErrorCode INVALID_ARGUMENT
public static final ErrorCode DEADLINE_EXCEEDED
public static final ErrorCode NOT_FOUND
public static final ErrorCode ALREADY_EXISTS
public static final ErrorCode PERMISSION_DENIED
public static final ErrorCode UNAUTHENTICATED
public static final ErrorCode RESOURCE_EXHAUSTED
public static final ErrorCode FAILED_PRECONDITION
public static final ErrorCode ABORTED
public static final ErrorCode OUT_OF_RANGE
public static final ErrorCode UNIMPLEMENTED
public static final ErrorCode INTERNAL
public static final ErrorCode UNAVAILABLE
public static final ErrorCode DATA_LOSS
public static ErrorCode[] values()
for (ErrorCode c : ErrorCode.values()) System.out.println(c);
public static ErrorCode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Status.Code getGrpcStatusCode()
ErrorCode
.Copyright © 2022 Google LLC. All rights reserved.