ExceptionUtilities.TraceException Method (Exception, TraceEventType, Int32, String)
Traces all detailed information for an exception to the log.
Namespace: Microsoft.ConfigurationManagement.AdminConsole
Assembly: Microsoft.ConfigurationManagement.ManagementProvider (in microsoft.configurationmanagement.managementprovider.dll)
Usage
'Usage
Dim ex As Exception
Dim traceEventType As TraceEventType
Dim eventId As Integer
Dim message As String
ExceptionUtilities.TraceException(ex, traceEventType, eventId, message)
Syntax
'Declaration
Public Shared Sub TraceException ( _
ex As Exception, _
traceEventType As TraceEventType, _
eventId As Integer, _
message As String _
)
public static void TraceException (
Exception ex,
TraceEventType traceEventType,
int eventId,
string message
)
public:
static void TraceException (
Exception^ ex,
TraceEventType traceEventType,
int eventId,
String^ message
)
public static void TraceException (
Exception ex,
TraceEventType traceEventType,
int eventId,
String message
)
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
Reference
ExceptionUtilities Class
ExceptionUtilities Members
Microsoft.ConfigurationManagement.AdminConsole Namespace