Freigeben über


TaskLoggingHelper.LogErrorFromResources Method

Definition

Logs an error using the specified resource string.

Overloads

LogErrorFromResources(String, Object[])

Logs an error using the specified resource string. Thread safe.

LogErrorFromResources(String, String, String, String, Int32, Int32, Int32, Int32, String, Object[])

Logs an error using the specified resource string and other error details. Thread safe.

LogErrorFromResources(String, Object[])

Source:
TaskLoggingHelper.cs

Logs an error using the specified resource string. Thread safe.

public:
 void LogErrorFromResources(System::String ^ messageResourceName, ... cli::array <System::Object ^> ^ messageArgs);
public void LogErrorFromResources (string messageResourceName, params object[] messageArgs);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public void LogErrorFromResources (string messageResourceName, params object[] messageArgs);
member this.LogErrorFromResources : string * obj[] -> unit
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
member this.LogErrorFromResources : string * obj[] -> unit
Public Sub LogErrorFromResources (messageResourceName As String, ParamArray messageArgs As Object())

Parameters

messageResourceName
String

The name of the string resource to load.

messageArgs
Object[]

Optional arguments for formatting the loaded string.

Attributes

Exceptions

Thrown when messageResourceName is null.

Remarks

This method is not thread-safe.

Applies to

LogErrorFromResources(String, String, String, String, Int32, Int32, Int32, Int32, String, Object[])

Source:
TaskLoggingHelper.cs

Logs an error using the specified resource string and other error details. Thread safe.

public:
 void LogErrorFromResources(System::String ^ subcategoryResourceName, System::String ^ errorCode, System::String ^ helpKeyword, System::String ^ file, int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber, System::String ^ messageResourceName, ... cli::array <System::Object ^> ^ messageArgs);
public void LogErrorFromResources (string subcategoryResourceName, string errorCode, string helpKeyword, string file, int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber, string messageResourceName, params object[] messageArgs);
member this.LogErrorFromResources : string * string * string * string * int * int * int * int * string * obj[] -> unit
Public Sub LogErrorFromResources (subcategoryResourceName As String, errorCode As String, helpKeyword As String, file As String, lineNumber As Integer, columnNumber As Integer, endLineNumber As Integer, endColumnNumber As Integer, messageResourceName As String, ParamArray messageArgs As Object())

Parameters

subcategoryResourceName
String

The name of the string resource that describes the error type (can be null).

errorCode
String

The error code (can be null).

helpKeyword
String

The help keyword for the host IDE (can be null).

file
String

The path to the file containing the error (can be null).

lineNumber
Int32

The line in the file where the error occurs (set to zero if not available).

columnNumber
Int32

The column in the file where the error occurs (set to zero if not available).

endLineNumber
Int32

The last line of a range of lines in the file where the error occurs (set to zero if not available).

endColumnNumber
Int32

The last column of a range of columns in the file where the error occurs (set to zero if not available).

messageResourceName
String

The name of the string resource containing the error message.

messageArgs
Object[]

Optional arguments for formatting the loaded string.

Exceptions

Thrown when messageResourceName is null.

Remarks

The parameters subCategoryResourceName, errorCode, helpKeyword, and file can be null.

The parameters lineNumber, columnNumber, endLineNumber, and endColumnNumber should be set to 0 if they are not available.

Applies to