IVsLanguageServiceBuildErrorReporter.ReportError 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
报告生成错误。
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
源代码文件的名称。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。