newObjects-logo.gif (1024 bytes) ScriptManager2 and ScriptAggregate reference
lastErrorEx property

read only

Returns the description of the last script error.

Set variable = object.lastErrorEx

variable object (collection) Last script error information
object ScriptManager2 or ScriptAggregate Previously created ScriptManager2/ScriptAggregate object


Inspect this property when script error is occured - After calling the Run method, AddText, AddEventHandler methods or calling script members through the script property.

The returned collection contains the following elements:

Set coll = host.lastErrorEx

coll("Source") - the error source. ActiveX class name or script engine name.

coll("Description") - String, description of the error.

coll("SourceLine") - String, source of the line that caused the error (if reproted)

coll("Line") - Long integer, line number where the error occured.

coll("Char") - Long integer, char number in the error line.

coll("Context") - Long integer, the context ID specified when the code containing this line was added to the host.

There is no guarantee that every script engine will fully support contexts. This is ok with Microsoft VBScript and JScript engines but for 3-d party script engines we recomend you to check their documentation first.

In case of ScriptAggregate object this property returns the error info from the script engine that caused the error.

Applies to:

ScriptManager2 and ScriptAggregate objects.

See also:


newObjects Copyright newObjects 2001-2005