public class SpannerException : Exception, ISerializableRepresents an error communicating with the Spanner database.
Implements
ISerializableNamespace
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 |
ErrorCodeThe ErrorCode for the exception. |
message |
StringA descriptive message about the exception. |
SpannerException(Status)
protected SpannerException(Status status)Creates a new instance of SpannerException.
| Parameter | |
|---|---|
| Name | Description |
status |
Google.Rpc.StatusThe 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> |
|