Table of Contents

Class CommunicationException

Namespace
Sportradar.OddsFeed.SDK.Common.Exceptions
Assembly
Sportradar.OddsFeed.SDK.dll

An exception thrown by the SDK when an error occurred while communicating with external source (Feed REST-ful API)

[Serializable]
public class CommunicationException : FeedSdkException, ISerializable
Inheritance
CommunicationException
Implements
Inherited Members

Constructors

CommunicationException()

Initializes a new instance of the CommunicationException class.

public CommunicationException()

CommunicationException(SerializationInfo, StreamingContext)

Initializes a new instance of the CommunicationException class.

public CommunicationException(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

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

context StreamingContext

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

CommunicationException(string, string, Exception)

Initializes a new instance of the CommunicationException class.

public CommunicationException(string message, string url, Exception innerException)

Parameters

message string

The error message that explains the reason for the exception.

url string

The string representation of the url specifying the resource which was being accessed .

innerException Exception

The exception that is the cause of the current exception, or a null reference if no inner exception is specified.

CommunicationException(string, string, HttpStatusCode, Exception)

Initializes a new instance of the CommunicationException class.

public CommunicationException(string message, string url, HttpStatusCode responseCode, Exception innerException)

Parameters

message string

The error message that explains the reason for the exception.

url string

The string representation of the url specifying the resource which was being accessed .

responseCode HttpStatusCode

A HttpStatusCode specifying the response code

innerException Exception

The exception that is the cause of the current exception, or a null reference if no inner exception is specified.

CommunicationException(string, string, HttpStatusCode, string, Exception)

Initializes a new instance of the CommunicationException class.

public CommunicationException(string message, string url, HttpStatusCode responseCode, string response, Exception innerException)

Parameters

message string

The error message that explains the reason for the exception.

url string

The string representation of the url specifying the resource which was being accessed .

responseCode HttpStatusCode

A HttpStatusCode specifying the response code

response string

A string representation of the response received from the external source

innerException Exception

The exception that is the cause of the current exception, or a null reference if no inner exception is specified.

Fields

Response

Gets the string representation of the response received from the external source (actual xml response or response message)

public readonly string Response

Field Value

string

ResponseCode

Gets the HttpStatusCode specifying the response's status code

public readonly HttpStatusCode ResponseCode

Field Value

HttpStatusCode

Properties

Url

Gets the string representation of the url specifying the resource which was being accessed

public string Url { get; }

Property Value

string

The URL.

Methods

GetObjectData(SerializationInfo, StreamingContext)

When overridden in a derived class, sets the SerializationInfo with information about the exception.

public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

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

context StreamingContext

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

ToString()

Returns a string that represents this instance.

public override string ToString()

Returns

string

A string that represents this instance.

See Also