Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"On Error Resume Next" scope in the script.
#1
Solved: 11 Years, 3 Months, 2 Weeks ago
Hi,

Please find below the attached piece of code. I was running it just to get an understanding of the functionality of "On Error Resume Next".

Code:
1.On error Resume next
2.a = 0
3.msgbox b
4.dafdsa,f,sdfsd
5.dasdgajrgjsgfjaity8w7etyeajmrhtwkjhtwhtu
6.l = 0
7.msgbox Err.Number
8.dfgdkjhgdkhgdkh67857368456834658
9.z = 0
10.msgbox Err.Number


The query here is: Does "On error Resume next" declared once at the starting of the script handles the errors at all the steps in the script
or does it take care of an error only till the succeeding step where it was defined.

As for the code above i was expecting an error at line 5 and line 8 but did not encounter any.

Regards,
Pallavi
Reply


Messages In This Thread
"On Error Resume Next" scope in the script. - by Pallavi - 02-01-2012, 02:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  VB Script access denied error when executing alm scripts in planned host Kumar Reshma 0 1,517 05-28-2018, 04:04 PM
Last Post: Kumar Reshma
  Windows 8 envirnment error while running QTP script. Rashmi Rajpal 0 2,433 10-10-2013, 12:21 PM
Last Post: Rashmi Rajpal
  qtp resume help me shyam.emmadi 0 2,217 04-21-2011, 03:00 PM
Last Post: shyam.emmadi
  Run the QTPTest script from the Quality Center then an error occurs shivakumar6g 8 12,766 03-04-2011, 11:52 AM
Last Post: shivakumar6g

Forum Jump:


Users browsing this thread: 3 Guest(s)