ComErrorException 构造函数

定义

初始化 ComErrorException 类的新实例。

重载

ComErrorException()

初始化 ComErrorException 类的新实例。

ComErrorException(String)

用指定的错误消息初始化 ComErrorException 类的新实例。

ComErrorException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 ComErrorException 类的新实例。

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

初始化 ComErrorException 类的新实例。

ComErrorException()

初始化 ComErrorException 类的新实例。

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

注解

此构造函数将新实例的 Message 属性初始化为系统提供的错误描述消息。

下表显示了 ComErrorException 实例的初始属性值。

properties
InnerException 空引用。
Message 系统提供的本地化说明。

适用于

ComErrorException(String)

用指定的错误消息初始化 ComErrorException 类的新实例。

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)

参数

message
String

描述错误的消息。

注解

下表显示了 ComErrorException 实例的初始属性值。

properties
InnerException null 引用(在 Visual Basic 中为 Nothing)。
Message 错误消息字符串。

适用于

ComErrorException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 ComErrorException 类的新实例。

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)

参数

message
String

解释异常原因的错误消息。

innerException
Exception

导致当前异常的异常。

注解

下表显示了 ConnectionFailureException 实例的初始属性值。

properties “值”
InnerException 内部异常引用。
Message 错误消息字符串。

适用于

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

初始化 ComErrorException 类的新实例。

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)

参数

comHResult
Int32

与此异常关联的错误代码 (HRESULT) 值。

description
String

错误的说明。

helpContext
Int32

帮助文件中的某一主题的上下文。

helpFile
String

帮助文件的完全限定的路径。

source
String

错误来源的名称。

interfaceId
Guid

作为错误来源的 COM 接口的标识符。

errorMessage
String

错误消息字符串。

适用于