DataServiceClientException Constructors

Definition

Initializes a new instance of the DataServiceClientException class.

Overloads

DataServiceClientException()

Initializes a new instance of the DataServiceClientException class with a system-supplied message that describes the error.

DataServiceClientException(String)

Initializes a new instance of the DataServiceClientException class with a specified message that describes the error.

DataServiceClientException(String, Exception)

Initializes a new instance of the DataServiceClientException class with a specified error message and a reference to the inner exception that is the cause of this exception.

DataServiceClientException(String, Int32)

Initializes a new instance of the DataServiceClientException class.

DataServiceClientException(String, Exception, Int32)

Initializes a new instance of the DataServiceClientException class.

DataServiceClientException()

Initializes a new instance of the DataServiceClientException class with a system-supplied message that describes the error.

public:
 DataServiceClientException();
public DataServiceClientException ();
Public Sub New ()

Remarks

This constructor initializes the Message property of the new instance to a system-supplied message that describes the error. This message takes into account the current system culture.

The following table shows the initial property values for an instance of InsufficientMemoryException.

Property Value
InnerException null.
Message The localized error message string.

See also

Applies to

DataServiceClientException(String)

Initializes a new instance of the DataServiceClientException class with a specified message that describes the error.

public:
 DataServiceClientException(System::String ^ message);
public DataServiceClientException (string message);
new System.Data.Services.Client.DataServiceClientException : string -> System.Data.Services.Client.DataServiceClientException
Public Sub New (message As String)

Parameters

message
String

The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

Remarks

The following table shows the initial property values for an instance of DataServiceClientException.

Property Value
InnerException null.
Message The error message string specified in message.

See also

Applies to

DataServiceClientException(String, Exception)

Initializes a new instance of the DataServiceClientException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public:
 DataServiceClientException(System::String ^ message, Exception ^ innerException);
public DataServiceClientException (string message, Exception innerException);
new System.Data.Services.Client.DataServiceClientException : string * Exception -> System.Data.Services.Client.DataServiceClientException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String

The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

innerException
Exception

The exception that is the cause of the current exception. If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Remarks

An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

The following table shows the initial property values for an instance of DataServiceClientException.

Property Value
InnerException null.
Message The error message string specified in message.

See also

Applies to

DataServiceClientException(String, Int32)

Initializes a new instance of the DataServiceClientException class.

public:
 DataServiceClientException(System::String ^ message, int statusCode);
public DataServiceClientException (string message, int statusCode);
new System.Data.Services.Client.DataServiceClientException : string * int -> System.Data.Services.Client.DataServiceClientException
Public Sub New (message As String, statusCode As Integer)

Parameters

message
String

The string value that contains the error message.

statusCode
Int32

The integer value that contains status code.

Applies to

DataServiceClientException(String, Exception, Int32)

Initializes a new instance of the DataServiceClientException class.

public:
 DataServiceClientException(System::String ^ message, Exception ^ innerException, int statusCode);
public DataServiceClientException (string message, Exception innerException, int statusCode);
new System.Data.Services.Client.DataServiceClientException : string * Exception * int -> System.Data.Services.Client.DataServiceClientException
Public Sub New (message As String, innerException As Exception, statusCode As Integer)

Parameters

message
String

The string value that contains the error message.

innerException
Exception

The System.Exception object that contains the inner exception.

statusCode
Int32

The integer value that contains status code.

Applies to