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 ()

備註

這個建構函式 (Constructor) 會將新執行個體的 Message 屬性初始化為系統提供用來描述錯誤的訊息。

下表顯示 ComErrorException 執行個體的初始屬性值。

屬性
InnerException null 參考。
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 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 執行個體的初始屬性值。

屬性
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

錯誤訊息字串。

適用於