This can be useful in naming objects and in custom logging. Right now the user has to find some way to record it separately, but TestComplete already knows this name so it should be easy to expose.
I create a try-catch block. Within the try I provoke an exception, this one I catch-up with the catch and read-out the function name in the stack.
Note: this also works across several units -> USEUNIT
let arrStackLines = ;
throw new Error("throw a error to get the stack");
arrStackLines = objE.stack.split("\n");
let strLine = arrStackLines[arrStackLines.length -1];
let intStart = strLine.indexOf("at ") + 3;
let intEnd = strLine.indexOf("(<");
SmartBear preferred value-added Service
Provider in the DACH region
Targetted for 14.20, September 2019.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.