Forum Discussion
HRm... what's happening at line 304 of Driver.fn_executemodules?
Also, do you have something going on in your OnLogError event handler?
The reason why I'm asking some of this is that, in developing Script Extensions, I noticed that if you have native TestComplete functions and objects being used outside of function declarations, the JScript engine doesn't recognize them.
For example, if I do something like this:
var testme = aqString.ToUpper('this is me');
function test1() {
Log.Message(testme);
}
this will generate a low level JavaScript error when it is executed within a script extension. So, I'm curious if you're calling a Log.Error call in a context for which the Log object is not defined? I don't have any specifics about WHERE that could be, but that seems to follow the pattern.
line 304 is doing below stuffs
try
{
//Function to eval the string into a executable functions if the function name is availble as input string
//Indicator.PushText("Execution Setup - Executing function...")
eval(aqConvert.VarToStr(temparrmodules[exI]));
//Indicator.Clear();
}
catch(ex)
{
Log.Error("Error occured during evaluation of module: " + arrModules[exI]);
Log.Error("Error Description: " + ex.stack);
} There are no event handlers for OnLogError, see below image
- tristaanogre9 years agoEsteemed Contributor
What does "temparmodules[exI]" evaluate as when the error occurs? That's my next suspicious point.
Also, the log text you posted a bit ago doesn't match the text in the catch line of what you posted around line 304. So, something else is bubbling up the exception being trapped by a different catch block.
- shankar_r9 years agoCommunity Hero
Actually, the error is coming from highlighted line.
catch(ex) { Log.Error("Error occured during evaluation of module: " + arrModules[exI]); Log.Error("Error Description: " + ex.stack); }- tristaanogre9 years agoEsteemed Contributor
Well, that's certainly interesting.
I wonder if you're getting the error because of trying to evaluate arrModules[exI]? Because, again, the error your posted does not include that text... so, we're getting an error trying to log the error... double check that arrModules[exI] actually evaluates properly when that error is fired (drop a breakpoint on that line in your catch and check the value of arrModules[exI]). It could be that you have an unhandled exception in your exception handler... which could cause all SORTS of funky. :)