SqlTraceException Constructors

Definition

Initializes a new instance of the SqlTraceException class.

Overloads

SqlTraceException()

Initializes a new instance of the SqlTraceException class.

SqlTraceException(String)

Initializes a new instance of the SqlTraceException class with the specified message.

SqlTraceException(SerializationInfo, StreamingContext)

Initializes a new instance of the SqlTraceException class with the specified serialization information and the specified streaming context.

SqlTraceException(String, Exception)

Initializes a new instance of the SqlTraceException class with the specified message and inner exception.

SqlTraceException(Type, String)

Initializes a new instance of the SqlTraceException class with the specified source type and the specified message.

SqlTraceException(Type, String, Exception)

Initializes a new instance of the SqlTraceException class with the specified source type, message and inner exception.

SqlTraceException()

Initializes a new instance of the SqlTraceException class.

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

Examples

Handling SMO Exceptions

Applies to

SqlTraceException(String)

Initializes a new instance of the SqlTraceException class with the specified message.

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)

Parameters

message
String

A String value that specifies the message associated with the general SQL Trace exception.

Examples

Handling SMO Exceptions

Applies to

SqlTraceException(SerializationInfo, StreamingContext)

Initializes a new instance of the SqlTraceException class with the specified serialization information and the specified streaming context.

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)

Parameters

info
SerializationInfo

A SerializationInfo object value that specifies the serialization information for the SQL Trace exception.

context
StreamingContext

A StreamingContext object value that specifies the streaming context for the SQL Trace exception.

Examples

Handling SMO Exceptions

Applies to

SqlTraceException(String, Exception)

Initializes a new instance of the SqlTraceException class with the specified message and inner exception.

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)

Parameters

message
String

A String value that specifies the message associated with the general SQL Trace exception.

innerException
Exception

An Exception object value that specifies the inner exception for the SQL Trace exception.

Examples

Handling SMO Exceptions

Applies to

SqlTraceException(Type, String)

Initializes a new instance of the SqlTraceException class with the specified source type and the specified message.

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)

Parameters

messageSource
Type

A Type system object value that specifies the source of the exception.

messageID
String

A String value that specifies the message associated with the general SQL Trace exception.

Examples

Handling SMO Exceptions

Applies to

SqlTraceException(Type, String, Exception)

Initializes a new instance of the SqlTraceException class with the specified source type, message and inner exception.

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)

Parameters

messageSource
Type

A Type system object value that specifies the source of the exception.

messageID
String

A String value that specifies the message associated with the general SQL Trace exception.

innerException
Exception

An Exception object value that specifies the inner exception.

Examples

Handling SMO Exceptions

Applies to