Table of Contents

Class CosmosOperationCanceledException

Namespace
Microsoft.Azure.Cosmos
Assembly
Microsoft.Azure.Cosmos.Client.dll

The exception that is thrown in a thread upon cancellation of an operation that the thread was executing. This extends the OperationCanceledException to include the diagnostics of the operation that was canceled.

public class CosmosOperationCanceledException : OperationCanceledException, ISerializable
Inheritance
CosmosOperationCanceledException
Implements
Inherited Members
Extension Methods

Constructors

CosmosOperationCanceledException(OperationCanceledException, CosmosDiagnostics)

Create an instance of CosmosOperationCanceledException

public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics)

Parameters

originalException OperationCanceledException

The original operation canceled exception

diagnostics CosmosDiagnostics

CosmosOperationCanceledException(SerializationInfo, StreamingContext)

Initializes a new instance of the CosmosOperationCanceledException class.

protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo object that holds serialized object data for the exception being thrown.

context StreamingContext

The StreamingContext that contains contextual information about the source or destination.

Properties

Data

public override IDictionary Data { get; }

Property Value

IDictionary

Diagnostics

Gets the diagnostics for the request

public CosmosDiagnostics Diagnostics { get; }

Property Value

CosmosDiagnostics
public override string HelpLink { get; set; }

Property Value

string

Message

public override string Message { get; }

Property Value

string

Source

public override string Source { get; set; }

Property Value

string

StackTrace

public override string StackTrace { get; }

Property Value

string

Methods

GetBaseException()

public override Exception GetBaseException()

Returns

Exception

GetObjectData(SerializationInfo, StreamingContext)

Sets the System.Runtime.Serialization.SerializationInfo with information about the exception.

public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo object that holds serialized object data for the exception being thrown.

context StreamingContext

The StreamingContext that contains contextual information about the source or destination.

ToString()

public override string ToString()

Returns

string