共用方式為


IVsLanguageServiceBuildErrorReporter2.ReportError2 Method

Definition

Reports a build error.

public:
 void ReportError2(System::String ^ bstrErrorMessage, System::String ^ bstrErrorId, Microsoft::VisualStudio::Shell::Interop::VSTASKPRIORITY nPriority, int iStartLine, int iStartColumn, int iEndLine, int iEndColumn, System::String ^ bstrFileName);
public:
 void ReportError2(Platform::String ^ bstrErrorMessage, Platform::String ^ bstrErrorId, Microsoft::VisualStudio::Shell::Interop::VSTASKPRIORITY nPriority, int iStartLine, int iStartColumn, int iEndLine, int iEndColumn, Platform::String ^ bstrFileName);
void ReportError2(std::wstring const & bstrErrorMessage, std::wstring const & bstrErrorId, Microsoft::VisualStudio::Shell::Interop::VSTASKPRIORITY nPriority, int iStartLine, int iStartColumn, int iEndLine, int iEndColumn, std::wstring const & bstrFileName);
public void ReportError2 (string bstrErrorMessage, string bstrErrorId, Microsoft.VisualStudio.Shell.Interop.VSTASKPRIORITY nPriority, int iStartLine, int iStartColumn, int iEndLine, int iEndColumn, string bstrFileName);
abstract member ReportError2 : string * string * Microsoft.VisualStudio.Shell.Interop.VSTASKPRIORITY * int * int * int * int * string -> unit
Public Sub ReportError2 (bstrErrorMessage As String, bstrErrorId As String, nPriority As VSTASKPRIORITY, iStartLine As Integer, iStartColumn As Integer, iEndLine As Integer, iEndColumn As Integer, bstrFileName As String)

Parameters

bstrErrorMessage
String

The error message.

bstrErrorId
String

The error ID.

nPriority
VSTASKPRIORITY

The error priority.

iStartLine
Int32

The starting line of the source code file.

iStartColumn
Int32

The starting column of the source code file.

iEndLine
Int32

The ending line of the source code file.

iEndColumn
Int32

The ending column of the source code file.

bstrFileName
String

The source code file name.

Remarks

This method works the same as ReportError, but allows you to provide the complete error span (that is, starting and ending positions, rather than just starting positions).

Applies to