Package com.google.cloud.spanner
Enum ErrorCode
- All Implemented Interfaces:
Serializable
,Comparable<ErrorCode>
Enumerates the major types of error that the Cloud Spanner service can produce. These codes are
accessible via
SpannerException.getErrorCode()
.-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorCode
fromGrpcStatus
(io.grpc.Status status) Returns the error code corresponding to a gRPC status, orUNKNOWN
if not recognized.io.grpc.Status.Code
static ErrorCode
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.
-
Enum Constant Details
-
CANCELLED
-
UNKNOWN
-
INVALID_ARGUMENT
-
DEADLINE_EXCEEDED
-
NOT_FOUND
-
ALREADY_EXISTS
-
PERMISSION_DENIED
-
UNAUTHENTICATED
-
RESOURCE_EXHAUSTED
-
FAILED_PRECONDITION
-
ABORTED
-
OUT_OF_RANGE
-
UNIMPLEMENTED
-
INTERNAL
-
UNAVAILABLE
-
DATA_LOSS
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getGrpcStatusCode
public io.grpc.Status.Code getGrpcStatusCode()- Returns:
- the corresponding gRPC status code of this
ErrorCode
.
-
fromGrpcStatus
Returns the error code corresponding to a gRPC status, orUNKNOWN
if not recognized.
-