APGen Documentation Previous Topic: APGScript.Arguments Collection Next Topic: APGScript.Filename Parent Topic: APGScript Object    APGScript Object
APGScript.Error Event
See Also:

The APGScript.Error event is fired when an error occurs while running the APGScript object.

Syntax

Generic:

Error(oAPGError)

Visual Basic:

Private WithEvents oScript As APGenLib.APGScript

Private Sub oScript_Error(ByVal oAPGError As APGenLib.IAPGError)
    . . .
End Sub

Parameters

oAPGError An APGError object.

Notes

For an example, see the Script Error Events topic.  The APGScript.OnError property provides equivalent functionality, and may be easier to use for error handling with script code.

The event handler should set oAPGError.Handled to true if the error is completely handled.  This prevents other error handlers from being called.  If oAPGError.Handled is not set to true, other error handlers, including the default handler, will be called.  See the topic Error Handling for more information on the error handling chain.  See APGError Object for a description of the APGError object.

Applies To

APGScript Object