BuildProvider.ProcessCompileErrors(CompilerResults) 方法

定義

在衍生類別中覆寫時,可讓您檢閱編譯器錯誤訊息,以便於修改它們提供更多資訊。When overridden in a derived class, enables you to review compiler error messages so that you can modify them to provide more information.

public:
 virtual void ProcessCompileErrors(System::CodeDom::Compiler::CompilerResults ^ results);
public virtual void ProcessCompileErrors (System.CodeDom.Compiler.CompilerResults results);
abstract member ProcessCompileErrors : System.CodeDom.Compiler.CompilerResults -> unit
override this.ProcessCompileErrors : System.CodeDom.Compiler.CompilerResults -> unit
Public Overridable Sub ProcessCompileErrors (results As CompilerResults)

參數

results
CompilerResults

編譯器結果。Compiler results.

備註

您通常會覆寫此方法,以便您可以在顯示編譯器錯誤之前加以修改,以便讓錯誤文字對使用者更有説明。You typically override this method so that you can modify compiler errors before they are displayed in order to make the error text more helpful to the user. 這在您知道某些錯誤內容的情況下很有用,而且可以為使用者提供如何修正的相關資訊。This is useful in scenarios where you know the context of certain errors and can provide information to the user about how to fix them. 原始的編譯器錯誤訊息通常專屬於特定語言結構,而且可能不會讓使用者察覺到真正的原因或解決方案。The original compiler error message is usually specific to a particular language construct and might not make the real cause or solution obvious to the user.

您可以使用傳遞至方法的CompilerResults物件來存取錯誤。You can access the errors by using the CompilerResults object that is passed to the method.

適用於