Error object

The Error object is used in scripts to get information about a specific error, such as the time it occurred or the text of the error. The only way to access a specific error is through the Errors Collection object. An Error object may contain warnings as well as errors.

Syntax
Set MyError = GetVariable(“Errors”).LastError
MyError
.[property]

– Or –

GetVariable(“Errors”).LastError.[property]

Parameters
None

Example
The following example demonstrates retrieving the last error that occurred in the integration:

Dim MyErrors, MyError
Set MyErrors = GetVariable("Errors")
Set MyError = MyErrors.LastError

The following example shows how to display the text of the last error or warning that occurred:

MsgBox GetVariable("Errors")._
LastError.MessageText

 

DateTime property

The DateTime property is a time stamp for when the error or warning occurred.

Syntax
object.DateTime

 

Severity property

Description
The Severity property indicates whether the Error Object is an error or a warning.

Syntax
object.Severity

Example
This example checks whether the error object is a warning:

  If MyError.Severity = GetVariable("SeverityWarning") then 
	MsgBox "This is a warning " & MyError.MessageText
  End If

 

This example checks whether the error object is an error:

  If MyError.Severity <> GetVariable("SeverityWarning") then 
	MsgBox "This is an error " & MyError.MessageText
  End If

 

MessageText property

The MessageText property contains the description of the error or warning that occurred.

Syntax
object.MessageText

 


Documentation Feedback