IVsLanguageServiceBuildErrorReporter.ReportError 方法

定义

报告生成错误。

public:
 int ReportError(System::String ^ bstrErrorMessage, System::String ^ bstrErrorId, Microsoft::VisualStudio::Shell::Interop::VSTASKPRIORITY nPriority, int iLine, int iColumn, System::String ^ bstrFileName);
public:
 int ReportError(Platform::String ^ bstrErrorMessage, Platform::String ^ bstrErrorId, Microsoft::VisualStudio::Shell::Interop::VSTASKPRIORITY nPriority, int iLine, int iColumn, Platform::String ^ bstrFileName);
int ReportError(std::wstring const & bstrErrorMessage, std::wstring const & bstrErrorId, Microsoft::VisualStudio::Shell::Interop::VSTASKPRIORITY nPriority, int iLine, int iColumn, std::wstring const & bstrFileName);
public int ReportError (string bstrErrorMessage, string bstrErrorId, Microsoft.VisualStudio.Shell.Interop.VSTASKPRIORITY nPriority, int iLine, int iColumn, string bstrFileName);
abstract member ReportError : string * string * Microsoft.VisualStudio.Shell.Interop.VSTASKPRIORITY * int * int * string -> int
Public Function ReportError (bstrErrorMessage As String, bstrErrorId As String, nPriority As VSTASKPRIORITY, iLine As Integer, iColumn As Integer, bstrFileName As String) As Integer

参数

bstrErrorMessage
String

错误消息。

bstrErrorId
String

错误 ID。

nPriority
VSTASKPRIORITY

错误优先级。

iLine
Int32

源代码文件的行。

iColumn
Int32

源代码文件的列。

bstrFileName
String

源代码文件的名称。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

适用于