Skip to content

Refactoring code to use more : Func_WebTable_CheckExist (CheckIfWebTableExist-InAMenuFrame) #3

@persistz

Description

@persistz

@PramodKumarYadav

In multiple functions we use the code:
'If table doesn't exists, exit the function
If Not objDescription.WebTable("name:="&strTableName,"Index:="&intIndex).Exist Then
Reporter.ReportEvent micFail,"WebTable doesn't exist","Table with name "&strTableName&", Index "&intIndex&" doesn't exist, please check"
Exit Function
End If
However, this is exactly what Func_WebTable_CheckExist could deliver, if we use it to return a value for 'Found' ; 'Not-Found'. This could then be used in other functions, to check for this value and proceed accordingly. Using this value we can then 'exit a function' or 'continue' in a calling function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions