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 |
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 | |
---|---|
Type | Description |
Nullable<TimeSpan> |