making use of "throw" information
EvanReese
Member, Mentor Posts: 3,100 PRO
When using a function like createPath(), that will throw "Edges do not form a continuous path." if given disjointed inputs, how would I best kill the regeneration and tell the user what's wrong? I feel like there's probably a simple way I'm not aware of. I'm currently trying this, but it doesn't seem to run the catch statement because downstream things just say "Variable path not found".
try
{
var path = constructPath(context, definition.curves);
}
catch (error)
{
regenError("Curves do not form a continuous path", ["curves"], definition.curves);
}
0
Answers
-
End the feature with a return?
Senior Director, Technical Services, EMEA1 -
I've not used "return" mid feature like that. good tip. My issue was that I was missing "throw" before the regenError() function.
0

