Errors Property

Home Page (Objects)OverviewFAQReference

Applies to: Application object

Gets the number of errors that occurred during the last build.

Syntax

object**.Errors**

Parameters

object

An expression that evaluates to an Application object.

Return Values

The Errors property returns one of the following values:

  • -1   No build has occurred during this session of the IDE.

  • 0   No errors occurred during the last build.

  • 1 or more   The number of errors that occurred during the last build, if any errors occurred.

Remarks

The Errors property is set immediately at the end of the build, before the BuildFinish event is fired. The value of the Errors property will match the errors parameter to the BuildFinish event.

Example

The following example reports the number of errors for a build:

if Errors = -1 then
   MsgBox( "No build has occurred yet." )
Else
   if Errors = 0 then
      MsgBox( "The last build was successful." )
   else
      MsgBox( "Errors occurred during the last build." )
   End if
End if

See Also   Application::Warnings property, Application::BuildFinish event.