IVsaSite.OnCompilerError Method
Notifies the host about how to respond to compiler errors encountered by the script engine.
public: bool OnCompilerError(
IVsaError* error
);
public bool OnCompilerError(
IVsaError error
);
MustOverride Public Function OnCompilerError( _
ByVal error As IVsaError _
) As Boolean
Return Value
Returns TRUE if the compiler is directed to continue reporting further errors to the IVsaSite object. Returns FALSE if the compiler is directed to stop reporting further errors to the IVsaSite object.
Parameters
- error
The IVsaError object representing the offending error.
Remarks
Called by an engine when a compiler error occurs.
If the OnCompilerError method returns false, the compiler should stop reporting further errors to the IVsaSite object. If it returns true, the compiler will continue to report further errors to the site using additional callbacks to the OnCompilerError method.
It is up to the specific script engine implementation whether the compiler does a full compile, and then notifies the site of errors one by one, or whether it notifies the site of errors in real-time as they occur. In the latter case, returning false from OnCompilerError would also potentially abort compilation.
The return value of the OnCompilerError method does not affect the return value of the IVsaEngine.Compile method; it will return true or false depending on whether it was able to generate a usable assembly.
The following table shows the exceptions that the OnCompilerError method can throw.
Exception Type |
Condition |
---|---|
CallbackUnexpected |
The host was not expecting a call at this time. |