How to get error description of all the errors

26 views
Skip to first unread message

zar...@gmail.com

unread,
Aug 1, 2018, 7:43:01 PM8/1/18
to QTP - HP Quick Test Professional - Automated Software Testing
Hi,

How can I get error description of all the errors that occurred in the script?  The code written below has two errors, however only the description of the last error is available at the end.


Thanks


On Error Resume Next

   Some Code   (this fails)
   Some Code
   Some Code    (this fails)




if Err.Number <> 0 Then
 
       msgbox Err.Description
      msgbox Err.Number
  
      Err.Clear
      On Error GoTo 0

End If


Reply all
Reply to author
Forward
0 new messages