Exception SpannerException (6.107.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.

getMessage()

public String getMessage()
Returns
Type Description
String
Overrides

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.

getPostgreSQLErrorCode()

public String getPostgreSQLErrorCode()

Returns the PostgreSQL SQLState error code that is encoded in this exception, or null if this SpannerException does not include a PostgreSQL error code.

Returns
Type Description
String

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()

getRequestId()

public String getRequestId()
Returns
Type Description
String

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

toString()

public String toString()
Returns
Type Description
String
Overrides