Class SpannerException
Represents an error communicating with the Spanner database.
Implements
Inherited Members
Namespace: Google.Cloud.Spanner.Data
Assembly: Google.Cloud.Spanner.Data.dll
Syntax
public class SpannerException : Exception, ISerializable
Constructors
SpannerException(ErrorCode, string)
Creates a new instance of SpannerException
Declaration
public SpannerException(ErrorCode code, string message)
Parameters
Type | Name | Description |
---|---|---|
ErrorCode | code | The ErrorCode for the exception. |
string | message | A descriptive message about the exception. |
SpannerException(Status)
Creates a new instance of SpannerException.
Declaration
protected SpannerException(Status status)
Parameters
Type | Name | Description |
---|---|---|
Status | status | The value from which to create the exception from. |
Properties
ErrorCode
An error code that indicates the general class of problem.
Declaration
public ErrorCode ErrorCode { get; }
Property Value
Type | Description |
---|---|
ErrorCode |
IsRetryable
If true, the error was likely a transient error and a retry of the operation may succeed.
Declaration
public bool IsRetryable { get; }
Property Value
Type | Description |
---|---|
bool |
RecommendedRetryDelay
For retryable SpannerException, this value represents the recommended minimum retry delay. It might or might not be present, even if this exception is retryable.
Declaration
public TimeSpan? RecommendedRetryDelay { get; }
Property Value
Type | Description |
---|---|
TimeSpan? |
RpcException
Returns the underlying RpcException. The returned value may be null if the SpannerException was not caused by an RpcException.
Declaration
public RpcException RpcException { get; }
Property Value
Type | Description |
---|---|
RpcException |