Occurs before an error message is posted to the test log.
|LogParams||[in]||Required||A LogParams object|
The event occurs before an error message is posted to the test log. You can use this event to perform desired actions when an error message is posted to the log.
For information on how to create an event handler for this and other TestComplete events, see Handling Events.
The event has the following parameters:
The Event control that processes the event.
The properties of the
LogParams object hold node attributes. You can use the
LogParams.MessageText property to replace the TestComplete text with your own.
|To avoid recurring calls, do not use the
OnLogError event is only generated for errors that occur when calling methods of TestComplete program objects. For example, this event is raised when you call
Log.Error to post the error message manually, or when you call a property or a method of a tested object that currently does not exist in the system.
OnLogError event is not raised for:
Exceptions. Exceptions can occur in the application under test and also can occur due to errors in the script code. For information on how to handle these exceptions, see Handling Exceptions in Scripts.
“The … process crashed” error.
Do not call the
Run method of the
Task objects from the event handler. Otherwise, an error will occur.
In addition, do not call the
NetworkSuite.Synchronize method from the event handler. The method will always return False.
Posting Messages to the Log