Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Class ErrorCode

Describes an error received from the server including name, description and retry stratergy.

Inheritance
object
ErrorCode
Inherited Members
object.GetType()
object.MemberwiseClone()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Couchbase.Core.IO.Operations.Errors
Assembly: Couchbase.NetClient.dll
Syntax
public class ErrorCode

Constructors

View Source

ErrorCode()

Declaration
public ErrorCode()

Properties

View Source

Attrs

Gets or sets the list of attribures for the error.

Declaration
[JsonPropertyName("attrs")]
public IEnumerable<string> Attrs { get; set; }
Property Value
Type Description
IEnumerable<string>
View Source

Desc

Gets or sets the description of the error.

Declaration
[JsonPropertyName("desc")]
public string Desc { get; set; }
Property Value
Type Description
string
View Source

Name

Gets or sets the name of the error.

Declaration
[JsonPropertyName("name")]
public string Name { get; set; }
Property Value
Type Description
string
View Source

Retry

Gets or sets the RetrySpec for the error.

Declaration
[JsonPropertyName("retry")]
public RetrySpec Retry { get; set; }
Property Value
Type Description
RetrySpec

Methods

View Source

GetNextInterval(uint, int)

Gets the next interval.

Declaration
public int GetNextInterval(uint attempts, int defaultTimeout)
Parameters
Type Name Description
uint attempts

The number of attempts.

int defaultTimeout

The default timeout.

Returns
Type Description
int

The next interval in ms.

View Source

HasTimedOut(double)

Determines whether if the error has timed out based on it's retry strategy.

Declaration
public bool HasTimedOut(double duration)
Parameters
Type Name Description
double duration

The amount of time already expired.

Returns
Type Description
bool

True if the retry strategy has timed out, otherwise false.

View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()
  • View Source
In this article
Back to top Copyright © 2020 Couchbase, Inc. All rights reserved.