Forum Discussion

nem's avatar
nem
Occasional Contributor
14 years ago

Is there a way to define which type of error occured?

Hi,



I wonder if there a way to define which type of error occurred (engine exception or TC object error) inside of OnLogError event handler?

I would like to execute different code for each of them inside of the event handler.



Thanks

2 Replies


  • Hi,





    Let me quote the TestComplete help system:







    The OnLogError is only generated for error messages caused by errors that occur during calls to methods of TestComplete’s program objects. For example, this event is raised when you call Log.Error to post the error message manually, or when an error occurs because of a call to Sys.Process to obtain the process object which currently does not exist in the system.





    The OnLogError event is not raised for error messages caused by 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.







    Also, refer to the following FAQ article .





    Does this information help? If it does not, please explain your task in detail.
  • nem's avatar
    nem
    Occasional Contributor
    Hi,



    I know all this information. Sorry, I just didn't manage to formulate my question correctly. I have already resolved the issue I had.



    Thanks for you help