Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
On Error Goto Label
#1
Solved: 11 Years, 3 Months, 1 Week ago
My QTP script looks like this:
On Error Goto ERR_Handler

ERR_Handler:
msgbox "error"

I have not recorded anything. I just want to try to use the above error handling logic. But I get syntax error for the first line - On Error Goto ERR_Handler

I don't understand why. any ideas?
Reply
#2
Solved: 11 Years, 3 Months, 1 Week ago
This is not supported by VBScript and so not in QTP.
You can use 'On Error Resume Next' or 'On Error Goto 0' only in qtp scripts.

Reply
#3
Solved: 11 Years, 3 Months, 1 Week ago
Hi,

I would like to know what exactly QTP will do when 'On Error Goto 0' is given? Can you please explain? Is '0' the number of the qtp step?
Reply
#4
Solved: 11 Years, 3 Months, 1 Week ago
Hi Neetha,

On Error goto 0 to turn off error handling flag.
See how: https://www.learnqtp.com/forums/Thread-W...-Err-Clear
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] Wpf Label: click on image into cell robertosalemi 1 2,446 05-03-2016, 05:46 PM
Last Post: robertosalemi

Forum Jump:


Users browsing this thread: 1 Guest(s)