Exception SpannerException (6.82.0)

public class SpannerException extends BaseGrpcServiceException

Base exception type for all exceptions produced by the Cloud Spanner service.

Methods

getDomain()

public String getDomain()

Checks the underlying reason of the exception and if it's ApiException then return the specific domain otherwise null. See Also: Domain

Returns
Type Description
String

the logical grouping to which the "reason" belongs.

getErrorCode()

public ErrorCode getErrorCode()

Returns the error code associated with this exception.

Returns
Type Description
ErrorCode

getErrorDetails()

public ErrorDetails getErrorDetails()

Checks the underlying reason of the exception and if it's ApiException then return the ErrorDetails otherwise null. See Also: Error Details, Status

Returns
Type Description
ErrorDetails

An object containing getters for structured objects from error_details.proto.

getMetadata()

public Map<String,String> getMetadata()

Checks the underlying reason of the exception and if it's ApiException then return a map of key-value pairs otherwise null. See Also: Metadata

Returns
Type Description
Map<String,String>

the map of additional structured details about an error.

getReason()

public String getReason()

Checks the underlying reason of the exception and if it's ApiException then return the reason otherwise null. See Also: Reason

Returns
Type Description
String

the reason of an error.

Overrides
com.google.cloud.BaseServiceException.getReason()

getRetryDelayInMillis()

public long getRetryDelayInMillis()

Return the retry delay for operation in milliseconds. Return -1 if this does not specify any retry delay.

Returns
Type Description
long