I have really tried (no pun intended) to use try() and throw() but it does not seem to work the way I read it.
I have a data set with columns Value and Parameter. I want to run a script and do many things to this data set but only if those columns exist. Can someone explain to me how to use try() and throw() in these instances or if they should be used at all?
Should the script look like this?
mydt=current data table();
if (
try(
Column (mydt, "Value") & Column (mydt, "Parameter"),
throw("Value and Parameter columns do not exist");
);
rest of script;
);
or this?
mydt=current data table();
try(
Column (mydt, "Value") & Column (mydt, "Parameter");
rest of script,
throw("Value and Parameter columns do not exist");
);