Micro Focus QTP (UFT) Forums
error management - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: error management (/Thread-error-management)



error management - stevol - 06-23-2008

Hi,
I created a function with query on a DB; sometimes I obtain errors, such as "ORA-00020: maximum number of processes (%s) exceeded"
obviously indipendent from the script.
Which instruction can I use to manage this error (and eventual similar) repeating automatically the function?
[is it possible to set a fixed number of attempts to repeat the function when there is an error?]
thanks a lot

PS: 'On error resume next' is insufficient in my need because bypasses error without retry


RE: error management - Ankur - 06-24-2008

you can raise an error using an err object... whenever you encounter that particular no, increase a counter by 1 till it reaches the value defined by you.