public class SpannerException : Exception, ISerializable
Reference documentation and code samples for the Google.Cloud.Spanner.Data class SpannerException.
Represents an error communicating with the Spanner database.
Implements
ISerializableDerived Types
Namespace
Google.Cloud.Spanner.DataAssembly
Google.Cloud.Spanner.Data.dll
Constructors
SpannerException(ErrorCode, string)
public SpannerException(ErrorCode code, string message)
Creates a new instance of SpannerException
Parameters | |
---|---|
Name | Description |
code |
ErrorCode The ErrorCode for the exception. |
message |
string A descriptive message about the exception. |
SpannerException(Status)
protected SpannerException(Status status)
Creates a new instance of SpannerException.
Parameter | |
---|---|
Name | Description |
status |
Status 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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
bool |
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 | |
---|---|
Type | Description |
TimeSpan |
RpcException
public RpcException RpcException { get; }
Returns the underlying RpcException. The returned value may be null if the SpannerException was not caused by an RpcException.
Property Value | |
---|---|
Type | Description |
RpcException |