Share via


DynamicsBaseHostedControl.LogException Method

Definition

Overloads

LogException(Exception, TraceEventType)

Logs an exception with information about the trace event type that caused the exception.

LogException(String, TraceEventType, Exception)

Logs an exception with user-provided error message and information about the trace event type that caused the exception.

LogException(Exception, TraceEventType)

Logs an exception with information about the trace event type that caused the exception.

protected void LogException (Exception ex, System.Diagnostics.TraceEventType eventType = System.Diagnostics.TraceEventType.Error);
member this.LogException : Exception * System.Diagnostics.TraceEventType -> unit
Protected Sub LogException (ex As Exception, Optional eventType As TraceEventType = System.Diagnostics.TraceEventType.Error)

Parameters

ex
Exception

The exception to log.

eventType
TraceEventType

Optional. The trace event type that caused the exception. If you do not specify the event type, by default Error trace event type is passed.

Applies to

LogException(String, TraceEventType, Exception)

Logs an exception with user-provided error message and information about the trace event type that caused the exception.

protected:
 void LogException(System::String ^ errorMessage, System::Diagnostics::TraceEventType eventType, Exception ^ ex);
protected void LogException (string errorMessage, System.Diagnostics.TraceEventType eventType, Exception ex);
member this.LogException : string * System.Diagnostics.TraceEventType * Exception -> unit
Protected Sub LogException (errorMessage As String, eventType As TraceEventType, ex As Exception)

Parameters

errorMessage
String

The user-provided error message to log.

eventType
TraceEventType

The trace event type that caused the exception.

ex
Exception

The exception to log.

Applies to