The Errors Collection object represents a collection of errors generated during an integration. Unlike the other VBScript objects, you need to explicitly retrieve the Errors Collection using the GetVariable function.
Syntax
Set MyErrors =
GetVariable(“Errors”)MyErrors.[property]
Parameters
None
Example Dim MyErrors, MyError Set MyErrors = GetVariable("Errors") Set MyError = MyErrors.LastError
The Count property returns the total number of errors in the collection.
Syntax
object.Count
Example If MyErrors.Count > 0 then MsgBox "An error occurred" End If
The LastError property contains the Error Object for the last error or warning that occurred.
Syntax
object.LastError
Examples Set MyError = MyErrors.LastError
Description
The Item
property acts as the array indexer into the Errors Collection. You
can retrieve a specific Error using this property by passing in the
ordinal of the Error you want. The ordinal starts at 1.
Syntax
object.Item
Example
This example gets the
Error Object at the start of the collection:
Set MyError = MyErrors.Item(1)