I'm having an issue using the MEL keyword catch. and its ability to catch the "object's name is not unique" error
assuming the DAG has the following objects: group1|pCube1, and group2|pCube1 .
the following code responds correctly when executed in the script editor:
string $errorShape="pCubeShape1;
if(catch(listConnections -c 0 -s 0 -d 1 $errorShape
))
{
print ("error caught!\n");
}
else
{
print ("this one is fine!\n");
}
however, when this code is placed in a procedure and called, it seems that only the commands following "else" are executed. This is making testing for non-unique names a problem, given that the command listConnections does not return a unique name, or even expose an option for -f (full path) as in listRelatives -f -s $var;
any insight would be appreciated.
Thx
S