แก้ไข

แชร์ผ่าน


DataServiceRequestException Constructors

Definition

Initializes a new instance of the DataServiceRequestException class.

Overloads

DataServiceRequestException()

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

DataServiceRequestException(String)

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

DataServiceRequestException(String, Exception)

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

DataServiceRequestException(String, Exception, DataServiceResponse)

Initializes a new instance of the DataServiceRequestException class.

DataServiceRequestException()

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

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

Remarks

This constructor initializes the Message property of the new instance to a system-supplied message that describes the error, such as "DefaultMessageDisplayedByParameterlessCtorWriterMustSupply". 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

DataServiceRequestException(String)

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

public:
 DataServiceRequestException(System::String ^ message);
public DataServiceRequestException (string message);
new System.Data.Services.Client.DataServiceRequestException : string -> System.Data.Services.Client.DataServiceRequestException
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 DataServiceRequestException.

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

See also

Applies to

DataServiceRequestException(String, Exception)

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

public:
 DataServiceRequestException(System::String ^ message, Exception ^ innerException);
public DataServiceRequestException (string message, Exception innerException);
new System.Data.Services.Client.DataServiceRequestException : string * Exception -> System.Data.Services.Client.DataServiceRequestException
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 DataServiceRequestException.

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

See also

Applies to

DataServiceRequestException(String, Exception, DataServiceResponse)

Initializes a new instance of the DataServiceRequestException class.

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

Parameters

message
String

Error message text.

innerException
Exception

Exception object that contains the inner exception.

Applies to