VBScript
This property returns a Windows Error Text (string) of the last read/write access of the persistent variable. The Windows Error Code (numerical) can be found in LatestError.
This property is read only.
As persistent variables are stored into a database there is a possibility of runtime errors. To check for any such runtime errors during read or write access of a persistent variable you can check LatestError for not equal zero.
If you have installed the Persistent Variable extension as recommended the chances for runtime errors are very low. Therefore it shouldn't be necessary to add error handling.
If you have installed the extension lets say into a database server on another machine it is highly recommended to add proper error handling.
Dim Announcement
Set Announcement = new PersistentVariable
Announcement.Name = "Welcome"
Announcement.Value = "Welcome Default.wav"
if Announcement.LatestError <> 0 then
' add your error handling here
' error code in LatestError
' error descr in LatestDescription
end if
The above example gives a template for own error handling.
By Tom Wellige