Class SpannerException (3.6.0)

public class SpannerException : Exception, ISerializable

Represents an error communicating with the Spanner database.

Inheritance

Object > Exception > SpannerException

Implements

ISerializable

Namespace

Google.Cloud.Spanner.Data

Assembly

Google.Cloud.Spanner.Data.dll

Constructors

SpannerException(ErrorCode, String)

public SpannerException(ErrorCode code, string message)

Creates a new instance of SpannerException

Parameters
NameDescription
codeErrorCode

The ErrorCode for the exception.

messageString

A descriptive message about the exception.

SpannerException(Status)

protected SpannerException(Status status)

Creates a new instance of SpannerException.

Parameter
NameDescription
statusStatus

The value from which to create the exception from.

Properties

ErrorCode

public ErrorCode ErrorCode { get; }

An error code that indicates the general class of problem.

Property Value
TypeDescription
ErrorCode

IsRetryable

public bool IsRetryable { get; }

If true, the error was likely a transient error and a retry of the operation may succeed.

Property Value
TypeDescription
Boolean

RecommendedRetryDelay

public TimeSpan? RecommendedRetryDelay { get; }

For retryable SpannerException, this value represents the recommended minimum retry delay. It might or might not be present, even if this exception is retryable.

Property Value
TypeDescription
Nullable<TimeSpan>

Extension Method