Forum Discussion

kaivi's avatar
kaivi
Contributor
6 years ago

check aqPerfomance

Hi,   is there any way to check if the aqPerfomance method is already running?   regards Kai
  • AlexKaras's avatar
    AlexKaras
    6 years ago

    Hi,

     

    > This is a recursive call from OnLogError that is stopped by TestComplete.

    A possible way to prevent this is to introduce a global or Project variable (I think that the latter is better) and use it as a flag. Like this:

    -- Name the variable as, say, bInErrorHandler and set it to false by default;

    -- The OnLogError function may look like this:

    function OnLogError(...)
    {
      if (bInErrorHandler)
        return;
      bInErrorHandler = true;
    
    ... // main handler's code
    
      bInErrorHandler = false;
    }