TaskLoggingHelper.LogWarningFromException Method

Definition

Logs a warning using the message from the specified exception.

Overloads

LogWarningFromException(Exception)

Logs a warning using the message from the given exception context. Thread safe.

LogWarningFromException(Exception, Boolean)

Logs a warning using the message (and optionally the stack-trace) from the given exception context. Thread safe.

LogWarningFromException(Exception)

Source:
TaskLoggingHelper.cs

Logs a warning using the message from the given exception context. Thread safe.

C#
public void LogWarningFromException(Exception exception);
C#
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public void LogWarningFromException(Exception exception);

Parameters

exception
Exception

Exception to log.

Attributes

Exceptions

Thrown when exception is null.

Remarks

This method is not thread-safe.

Applies to

MSBuild 17 i druge verzije
Proizvod Verzije
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17

LogWarningFromException(Exception, Boolean)

Source:
TaskLoggingHelper.cs

Logs a warning using the message (and optionally the stack-trace) from the given exception context. Thread safe.

C#
public void LogWarningFromException(Exception exception, bool showStackTrace);

Parameters

exception
Exception

Exception to log.

showStackTrace
Boolean

If true, the exception callstack is appended to the message.

Exceptions

Thrown when exception is null.

Remarks

This method is not thread-safe.

Applies to

MSBuild 17 i druge verzije
Proizvod Verzije
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17