SqlTraceException 建構函式

定義

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

多載

SqlTraceException()

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

SqlTraceException(String)

使用指定的訊息初始化 SqlTraceException 類別的新執行個體。

SqlTraceException(SerializationInfo, StreamingContext)

初始化具有指定的序列化資訊和指定的資料流內容之 SqlTraceException 類別的新執行個體。

SqlTraceException(String, Exception)

使用指定的訊息和內部例外狀況初始化 SqlTraceException 類別的新執行個體。

SqlTraceException(Type, String)

使用指定的來源類型和指定的訊息,初始化 SqlTraceException 類別的新執行個體。

SqlTraceException(Type, String, Exception)

使用指定的來源類型、訊息和內部例外狀況,初始化 SqlTraceException 類別的新執行個體。

SqlTraceException()

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

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

範例

處理 SMO 例外狀況

適用於

SqlTraceException(String)

使用指定的訊息初始化 SqlTraceException 類別的新執行個體。

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

參數

message
String

String 值,指定與一般 SQL 追蹤例外狀況相關聯的訊息。

範例

處理 SMO 例外狀況

適用於

SqlTraceException(SerializationInfo, StreamingContext)

初始化具有指定的序列化資訊和指定的資料流內容之 SqlTraceException 類別的新執行個體。

protected:
 SqlTraceException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected SqlTraceException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new Microsoft.SqlServer.Management.Trace.SqlTraceException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.SqlServer.Management.Trace.SqlTraceException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

參數

info
SerializationInfo

SerializationInfo 物件值,指定 SQL 追蹤例外狀況的序列化資訊。

context
StreamingContext

StreamingContext 物件值,指定 SQL 追蹤例外狀況的資料流內容。

範例

處理 SMO 例外狀況

適用於

SqlTraceException(String, Exception)

使用指定的訊息和內部例外狀況初始化 SqlTraceException 類別的新執行個體。

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

參數

message
String

String 值,指定與一般 SQL 追蹤例外狀況相關聯的訊息。

innerException
Exception

Exception 物件值,指定代表 SQL 追蹤例外狀況的內部例外狀況。

範例

處理 SMO 例外狀況

適用於

SqlTraceException(Type, String)

使用指定的來源類型和指定的訊息,初始化 SqlTraceException 類別的新執行個體。

public:
 SqlTraceException(Type ^ messageSource, System::String ^ messageID);
public SqlTraceException (Type messageSource, string messageID);
new Microsoft.SqlServer.Management.Trace.SqlTraceException : Type * string -> Microsoft.SqlServer.Management.Trace.SqlTraceException
Public Sub New (messageSource As Type, messageID As String)

參數

messageSource
Type

指定例外狀況來源的 Type 系統物件值。

messageID
String

String 值,指定與一般 SQL 追蹤例外狀況相關聯的訊息。

範例

處理 SMO 例外狀況

適用於

SqlTraceException(Type, String, Exception)

使用指定的來源類型、訊息和內部例外狀況,初始化 SqlTraceException 類別的新執行個體。

public:
 SqlTraceException(Type ^ messageSource, System::String ^ messageID, Exception ^ innerException);
public SqlTraceException (Type messageSource, string messageID, Exception innerException);
new Microsoft.SqlServer.Management.Trace.SqlTraceException : Type * string * Exception -> Microsoft.SqlServer.Management.Trace.SqlTraceException
Public Sub New (messageSource As Type, messageID As String, innerException As Exception)

參數

messageSource
Type

指定例外狀況來源的 Type 系統物件值。

messageID
String

String 值,指定與一般 SQL 追蹤例外狀況相關聯的訊息。

innerException
Exception

指定內部例外狀況的 Exception 物件值。

範例

處理 SMO 例外狀況

適用於