ContributionsMost RecentMost LikesSolutionsRe: calling two functions in a single line of code? Can you be more specific like exactly what you want to do? Calling multiple functions in a single line makes sense when all the methods return some value and combined output is required for further processing. If you can provide more details on the question(like the use of methods,need of calling 2 functions in the same line), that will be better. Thanks, Sushant Re: How to prevent error handler to go back to the error line after executing GeneralEvents_OnLogError? Well python errors are well under control, but for UI errors, I was relying on GeneralEvents_OnLogError since Ui errors can either be controlled by stop on error setting or onlogerror method. Thats where I am stuck. Anyways Thanks for your help. :) If you have any other clue please let me know. Re: How to prevent error handler to go back to the error line after executing GeneralEvents_OnLogError? Got your point but it won't help. If onlogerror isremoved and Stop on error is unchecked (which is definitely required to continue the script execution), all the statements in performActions will be executed even if error come up on some line. This is very risky considering the fact that a previous step wasn't performed correctly. I need something like continue which can be used to skip the next steps for that iteration and start the next iteration of the loop whenever there is an UI error. Re: How to prevent error handler to go back to the error line after executing GeneralEvents_OnLogError? Thanks Shankar. Well I actually have a different requirement. I have a list of data for which the same set of actions needs to be performed. Whenever an UI error occurs for one instance, I need to close the software -> Relaunch it -> then start the process for the next item in the list. I am maintaining list index globally so thats not a problem. I tried incrementing index in onlogerror method and called the main function again (although its not the correct approach) and runner.stop() after that. index=0 def main(): global index list = ["A","b","c"] launchApplication() while index<len(list): performActions(list(index)) #this code will throw UI errors def GeneralEvents_OnLogError(Object Sender, EventArgs logParam): global index index = index + 1 closeApplication() main() Runner.Stop() The issue here is although the error instance is skipped and the next set of items are executed, the code after executing main() (underlined) doesn't stop and goes back to the line where error came up first. How to prevent error handler to go back to the error line after executing GeneralEvents_OnLogError? Hi, For handling UI errors, I am using GeneralEvents_OnLogError which again goes to the error line after executingits definition. But I don't want it to return to the original error source. Instead I want that the script execution should stop after execution ofGeneralEvents_OnLogError is complete. How can I achieve this? Thanks in advance. Re: GeneralEvents_OnLogError Running Infinitely karkadil: The issue here is that the error occurs in performTask method after which generalevents_onlogerror is invoked and the control goes back to the step where error occured (which again causes failure since the application is closed by the onlogerror method). I need to close then reopen the application and start the same (performTask) for the next item in the list. Any suggestions, how can I achieve this? Re: GeneralEvents_OnLogError Running Infinitely Thanks for your reply. But I am not sure if this will work The requirement is to run performTask method for every item of the list. I believe in your suggestion,the script executionwould stop once any error occurs for an item(i.e. once the code enters OnLogError method). But instead of stopping the execution, I need to continue the process with the next item in the list. I have been able to achieve this with my code(posted in the question) but the issue that I am facing is that the GeneralEvents_OnLogError is getting executed recursively even after completingthe process for all the items. Kindly guide me how can I handle this. GeneralEvents_OnLogError Running Infinitely The event handlerGeneralEvents_OnLogError is getting executed recursively. Scenario: Have a collection of items for which 1 same process has to be performed. But if there is any error thrown during the execution for any item, TestComplete should close and restart the application and continue the same process with the next item in the collection. But theGeneralEvents_OnLogError gets executed infinitely if an error occurs. Ideally script execution should end once the main is completely executed. Kindly let me know what could be the possible root cause of the issue? Thanks in advance! Please find the sample code below. indexValue = 0 list = [1,2,3,5,10,8] def main(): launchApplication() while indexValue<len(list): performTask(list(indexValue)) indexValue = indexValue + 1 Log.Message("Process Completed") def GeneralEvents_OnLogError(Sender, LogParams): global indexValue indexValue= indexValue+ 1 CloseOpenApplcaition() main() Re: GeneralEvents_OnLogError Running Infinitely Thanks a lot Robert for your detailed reply. :) I have a further query for the solution that you have suggested. In performTask method, if the error occurs due to some unexpected window, or any other issue where UI objects are involved, will the exception handling of python handle it? I believe the Python exception handling can only handle python errors and not the UI window errors. I may be completely wrong as I am new to Test Complete. Kindly post your thoughts on this.