Forum Discussion
That is weird. Logging is a built in capability of TC so having it generate that kind of error is... weird.
So... question, that error you got, is it happening on the Log.Error in the catch or is it happening up within your main function code? It would be interesting to step through and see where you're actually getting the error... it's almost like something has gone out of context somewhere where the Log object is no longer recognized.
I'm doing some scripting AUT methods like getModel(), getNodeArray() [this is some customized functions in AUT]. I got an exception inside try and then TC tried to log the error in catch block. Then this weird thing happend.
And also this is not happening always, Last few days i'm getting this error.
- shankar_r8 years agoCommunity Hero
Actual error message which i got.
Error occured in driver script and Error Description: TypeError: Log.Error is not a function at fn_executemodules (<aq:Driver>:304:29) at driverscript (<aq:Driver>:168:31) 18:43:48 Normal
- tristaanogre8 years agoEsteemed Contributor
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.
- shankar_r8 years agoCommunity Hero
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
Related Content
Recent Discussions
- 3 days ago