Udostępnij za pośrednictwem


ComErrorException Constructors

Definition

Initializes a new instance of the ComErrorException class.

Overloads

ComErrorException()

Initializes a new instance of the ComErrorException class.

ComErrorException(String)

Initializes a new instance of the ComErrorException class with a specified error message.

ComErrorException(String, Exception)

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

ComErrorException(Int32, String, Int32, String, String, Guid, String)

Initializes a new instance of the ComErrorException class.

ComErrorException()

Initializes a new instance of the ComErrorException class.

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

Remarks

This constructor initializes the Message property of the new instance to a system-supplied message that describes the error.

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

Property Value
InnerException A null reference.
Message A system-supplied localized description.

Applies to

ComErrorException(String)

Initializes a new instance of the ComErrorException class with a specified error message.

public:
 ComErrorException(System::String ^ message);
public ComErrorException (string message);
new Microsoft.SqlServer.Replication.ComErrorException : string -> Microsoft.SqlServer.Replication.ComErrorException
Public Sub New (message As String)

Parameters

message
String

A message that describes the error.

Remarks

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

Property Value
InnerException A null reference (Nothing in Visual Basic).
Message The error message string.

Applies to

ComErrorException(String, Exception)

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

public:
 ComErrorException(System::String ^ message, Exception ^ innerException);
public ComErrorException (string message, Exception innerException);
new Microsoft.SqlServer.Replication.ComErrorException : string * Exception -> Microsoft.SqlServer.Replication.ComErrorException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String

The error message that explains the reason for the exception.

innerException
Exception

The exception that is the cause of the current exception.

Remarks

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

Property Value
InnerException The inner exception reference.
Message The error message string.

Applies to

ComErrorException(Int32, String, Int32, String, String, Guid, String)

Initializes a new instance of the ComErrorException class.

public:
 ComErrorException(int comHResult, System::String ^ description, int helpContext, System::String ^ helpFile, System::String ^ source, Guid interfaceId, System::String ^ errorMessage);
public ComErrorException (int comHResult, string description, int helpContext, string helpFile, string source, Guid interfaceId, string errorMessage);
new Microsoft.SqlServer.Replication.ComErrorException : int * string * int * string * string * Guid * string -> Microsoft.SqlServer.Replication.ComErrorException
Public Sub New (comHResult As Integer, description As String, helpContext As Integer, helpFile As String, source As String, interfaceId As Guid, errorMessage As String)

Parameters

comHResult
Int32

The error code (HRESULT) value associated with this exception.

description
String

Description of the error.

helpContext
Int32

The context of a topic in a Help file.

helpFile
String

The fully qualified path to a Help file.

source
String

The name of the source of the error.

interfaceId
Guid

The identifier of the COM interface that is the source of the error.

errorMessage
String

The error message string.

Applies to