Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
making use of "throw" information
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);
}
Answers
End the feature with a return?
I've not used "return" mid feature like that. good tip. My issue was that I was missing "throw" before the regenError() function.