Intellipro      Your Ad Here

Automating QTP Test Automation                  Home Automation Articles Downloads QTP Gotchas Links Books Contact About Site Map

Home

Automation

Articles

Downloads

QTP Gotchas

Links

Books

Contact

About

Site Map

 

 

 

 

 

General Function - Log Error

This function writes details of an error to the Application Event Log, using the function Log Event.

Download it Here (right-click and then save target as).

(NOTE - you can just cut & paste from below, but the formatting will have multiple spaces instead of tabs).

'=========================================================================

Sub zGen_LogError(sApp, sModule, iLine, iErr, sErrDesc, sErrSrce)

    'Writes Errors to the Application Event Log

    Dim sDesc
    Const LOG_ERROR = 1

    sDesc = "zGenLogError:" & vbcrlf & vbcrlf

    sDesc = sDesc & "In App :" & vbTab & sApp & vbcrlf
    sDesc = sDesc & "In Mod :" & vbTab & sMod & vbcrlf
    sDesc = sDesc & "At Line :" & vbTab & cStr(iLine)& vbcrlf
    sDesc = sDesc & "Err Num :" & vbTab & cStr(iErr) & vbcrlf & vbcrlf
    sDesc = sDesc & "Description:" & vbcrlf & sErrDesc & vbcrlf & vbcrlf
    sDesc = sDesc & "Source:" & vbcrlf & sErrSrce

    Call zGen_LogEvent(LOG_ERROR, sDesc)

End Sub

'=========================================================================
Your Ad Here

Copyright © 2009 Intellipro Services Ltd. All rights reserved                      Home About Privacy Policy Terms of use Contact Site Map






































































advanced advice agile answers application articles aut automated automating automation basics beginners browser button checkbox child childobjects click close code coding combo combobox consultant consultancy convention count createobject database delete descriptive download downloads dp edit editbox element enhancements error examples faq faqs file files filesystemobject fixes folder folders forum framework frameworks function functions generation generator getobject getroproperty gotchas group guide guru harness hewlett hp inputbox insert intellipro interview language library libraries link list listbox manifesto manual master name naming navigate object or packard page ping pro problem procedure procedures professional programming qtp query queries question questions quick quicktest radio refresh repository ross row rows samples script scripts scrum select server software specific sprint sql step stored strategy structure sub subroutine suite sync tables test testing text textbox title tool tools tsl tutorial update updates url vbscript web webedit webpage webradiogroup weblist whittaker wscript