Traces all detailed information for an exception to the log. Namespace: Microsoft.ConfigurationManagement.AdminConsole
Assembly: Microsoft.ConfigurationManagement.ManagementProvider (in microsoft.configurationmanagement.managementprovider.dll)

Usage

Visual Basic
Dim ex As Exception
Dim traceEventType As TraceEventType
Dim eventId As Integer
Dim message As String

ExceptionUtilities.TraceException(ex, traceEventType, eventId, message)

Syntax

Visual Basic
Public Shared Sub TraceException ( _
		ex As Exception, _
		traceEventType As TraceEventType, _
		eventId As Integer, _
		message As String _
)
C#
public static void TraceException (
		Exception ex,
		TraceEventType traceEventType,
		int eventId,
		string message
)
C++
public:
static void TraceException (
		Exception^ ex, 
		TraceEventType traceEventType, 
		int eventId, 
		String^ message
)
J#
public static void TraceException (
		Exception ex, 
		TraceEventType traceEventType, 
		int eventId, 
		String message
)
JScript
public static function TraceException (
		ex : Exception, 
		traceEventType : TraceEventType, 
		eventId : int, 
		message : String
)

Parameters

ex

[in] System.Exception object.

traceEventType

[in] System.Diagnostics.TraceEventType object for the trace type.

eventId

[in] Event identifier.

message

[in] Message to use in the trace.

Exceptions

Exception type Condition
ArgumentNullException

The ex parameter cannot be null.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2003,Windows Vista

See Also