I am using Google Apps Script in a Google Sheet. I added some code recently that was causing an error due to me trying to access locked data. I tried some basic error trapping using Try / Catch and this works fine when I run my code, but in debug mode the program halts execution on the line in question. Am I using Try / Catch wrong, or is there something else I'm missing?
Here's my code:
for (var i=0;i<userGroups.length;i++) {
try {
var temp = userGroups[i].getUsers();
} catch(error) {
console.log(error);
}
...
NOTE: I am NOT using the V8 runtime as it was causing me a lot of issues.