This documentation is archived and is not being maintained.

IVsaSite.OnCompilerError Method

Notifies the host about how to respond to compiler errors encountered by the script engine.

[Visual Basic]
Function OnCompilerError( _
   ByVal error As IVsaError _
) As Boolean
[C#]
bool OnCompilerError(
   IVsaError error
);
[C++]
bool OnCompilerError(
   IVsaError* error
);
[JScript]
function OnCompilerError(
   error : IVsaError
) : Boolean;

Parameters

error
The IVsaError object representing the offending error.

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.

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.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

IVsaSite Interface | IVsaSite Members | Microsoft.Vsa Namespace | IVsaEngine.Compile

Show: