How to handle run time errors?

Answer Posted / barun choudhary

(a) On Error Resume Next : causes execution to continue with the statement immediately following the statement that caused the run-time error, or with the statement immediately following the most recent call out of the procedure containing the On Error Resume Next statement. This allows execution to continue despite a run-time error. You can then build the error-handling routine inline within the procedure.
Using "Err" object msgbox "Error no: " & " " & Err.Number & " " & Err.description & " " & Err.Source & Err.HelpContext

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give me At Least 5 Differences between DOCUMENTATION OBJECT MODEL(DOM)and COMPONENT OBJECT MODEL(COM)? Interviewer said me to WRITE the difference only in points not as you WRITE a paragraph ???? only in points

1737


Is any limitation to xml checkpoints?

654


An object is non standard object, i mapped it to standard object, eventhogh on mapping to standard object i cannot use the methods available on the standard object with the mapped object. How i can use those standard object methods with these mapped object. (((Note : dont tell that we can use virtual object as virtual object is to map nonstandard obj to standard obj)))

1700


Is there any pdf or online book for QTP Scripting? Let me know more about QTP Scripting.

2501


How to use the object spy in quicktest professional 8.0 version?

628






What are the types of object repositories? Which one is you using?

718


Consider one application is open, clicking one menu will open another application in another browser. QTP does not catch the URL of the second browser(second application). can we capture it ?

1577


I have enrolled for a QTP course which is a four weekend course.Do you think its a good way to start off learning this tool?What all do i need with me in order to become a pro at using this tool?

1759


Difference between action & Reusable action?

750


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.

631


I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all

1616


Where we use data driver in qtp?

690


Is text area check point supports for web applications?

614


If we put all properties in mandatory and assistive list of Normal Identification, Do we still need Smart?

664


In a flight window we have to enter the name and meal request for every passenger.In that window if we give Total passengers=1 then the Psngr1 name field and psngr1 meal request field will reflects.if we give Total passengers=2 then Psngr1 name field and psngr1 meal request field,Psngr2 name field and psngr2 meal request field and so on. how we can handle this scenerio thru Descriptive programming?

1543