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
infoSerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.
contextStreamingContextThe 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
messagestringThe error message that explains the reason for the exception.
urlstringThe string representation of the url specifying the resource which was being accessed .
innerExceptionExceptionThe 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
messagestringThe error message that explains the reason for the exception.
urlstringThe string representation of the url specifying the resource which was being accessed .
responseCodeHttpStatusCodeA HttpStatusCode specifying the response code
innerExceptionExceptionThe 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
messagestringThe error message that explains the reason for the exception.
urlstringThe string representation of the url specifying the resource which was being accessed .
responseCodeHttpStatusCodeA HttpStatusCode specifying the response code
responsestringA string representation of the response received from the external source
innerExceptionExceptionThe 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
ResponseCode
Gets the HttpStatusCode specifying the response's status code
public readonly HttpStatusCode ResponseCode
Field Value
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
infoSerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.
contextStreamingContextThe StreamingContext that contains contextual information about the source or destination.
ToString()
Returns a string that represents this instance.
public override string ToString()