DataServiceException DataServiceException DataServiceException DataServiceException Constructors

Definition

Overloads

DataServiceException() DataServiceException() DataServiceException()

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

DataServiceException(String) DataServiceException(String) DataServiceException(String) DataServiceException(String)

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

DataServiceException(Int32, String) DataServiceException(Int32, String) DataServiceException(Int32, String) DataServiceException(Int32, String)

Initializes a new instance of the DataServiceException class.

DataServiceException(String, Exception) DataServiceException(String, Exception) DataServiceException(String, Exception) DataServiceException(String, Exception)

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

DataServiceException(Int32, String, String, String, Exception) DataServiceException(Int32, String, String, String, Exception) DataServiceException(Int32, String, String, String, Exception) DataServiceException(Int32, String, String, String, Exception)

Initializes a new instance of the DataServiceException class.

DataServiceException() DataServiceException() DataServiceException()

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

public:
 DataServiceException();
public DataServiceException ();
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.

See also

DataServiceException(String) DataServiceException(String) DataServiceException(String) DataServiceException(String)

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

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

Parameters

message
String String String 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 DataServiceException.

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

DataServiceException(Int32, String) DataServiceException(Int32, String) DataServiceException(Int32, String) DataServiceException(Int32, String)

Initializes a new instance of the DataServiceException class.

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

Parameters

statusCode
Int32 Int32 Int32 Int32

The HTTP status code returned by the exception.

message
String String String String

The error message for the exception.

DataServiceException(String, Exception) DataServiceException(String, Exception) DataServiceException(String, Exception) DataServiceException(String, Exception)

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

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

Parameters

message
String String String 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 Exception Exception Exception

The exception that is the cause of the current 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 DataServiceException.

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

DataServiceException(Int32, String, String, String, Exception) DataServiceException(Int32, String, String, String, Exception) DataServiceException(Int32, String, String, String, Exception) DataServiceException(Int32, String, String, String, Exception)

Initializes a new instance of the DataServiceException class.

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

Parameters

statusCode
Int32 Int32 Int32 Int32

The HTTP status code of the exception.

errorCode
String String String String

The string value that contains the error code.

message
String String String String

The string value that contains the error message.

messageXmlLang
String String String String

The string value that indicates the language of the error message.

innerException
Exception Exception Exception Exception

The exception that is the cause of the current exception.

Applies to