Error Handling during run time - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: General (https://www.learnqtp.com/forums/Forum-General) +--- Forum: Posting Guidelines/Disclaimer (https://www.learnqtp.com/forums/Forum-Posting-Guidelines-Disclaimer) +--- Thread: Error Handling during run time (/Thread-Error-Handling-during-run-time) |
Error Handling during run time - Vidya Hiremath - 12-08-2017 Hi, I am running DB queries in the framework. During the execution, if the data is deleted in the backend tables, then UFt will throw the error message box as like below. I want to skip the error and continue and report the error description in the xml result sheet. Error Message: Run Error: Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record I am trying to add by recovery scenario by calling error function and proceed to next step. My error function is as like below: Function RecoveryFunction1(Object, Method, Arguments, retVal) If err.number<>"" then error1=err.description Reporter.reportevent micwarning,"Error ocurred:","","Error Details: "&error1&" End If End Function I have added the above function in the function library and associated the recovery scenario in the test settings. But still error message is throwing up. Please help me to handle the error message during run time instead of writing for each and every function 'on error resume next' statement. |