語言

ComErrorException 建構函式

定義

初始化 ComErrorException 類別的新執行個體。

多載

名稱 Description
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初始屬性值。

房產 值
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初始屬性值。

房產 值
InnerException 一個空參考(Visual Basic 中沒有任何參考)。
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初始屬性值。

房產 值
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

錯誤訊息字串。

適用於