function getValue(obj, path) {
if (!path) { return obj; }
var properties = path.split('.');
try {
return getValue(obj[properties.shift()], properties.join('.'));
}
catch (err) {
Logger.log("no value for %s, error = %s",properties,err);
if (err == "TypeError") {
return null;
}
}
}
I'm calling it by referencing the library and the function like this:
function getValuecall(obj, path) {
let r = BurnupGetValue.getValue(obj, path);
return r;
}
if the catch in getValue(obj, path) - in the library BurnupGetValue - executes and returns null, then the new IDE debugger stops at the "return r" line of the calling function getValuecall.
I don't understand why. The catch error is happening in a library NOT in the code in the IDE. I put it in a library so that this wouldn't stop the IDE.
The other interesting thing is, the IDE only stops on "return r" line, if I have a breakpoint in the IDE that I have stopped at BEFORE executing this code. In other works, I'm in the IDE, I stop at a breakpoint, then I continue execution and the condition described above is triggered....
Thanks