Grasshopper

algorithmic modeling for Rhino

I just finished my first couple of components, and after looking at the different examples and existing .gha components, I'm wondering what are good practices for handling errors.

I noticed that many of David's components bring up the GH_RuntimeMessageLevel.Error while the examples in the SDK often use "Return" to exit the component. I'm leaning towards the runtime message.

Any guidelines or thoughts?

And while I'm on the topic of error handling, any suggestions for catching an input file path that doesn't exist?

Views: 1081

Replies to This Discussion

I'm thinking maybe there's a better way than putting the balloon there. Considering that you'd have to hover over the balloon anyway, why not put the error right in the hover for the component itself, in a similar fashion to how the inputs and outputs are displayed when you hover over a node?

In looking at this a little closer, there are node level runtime messages (inputs to be more specific) and component level runtime messages. I think it might(?) be helpful to make a visual distinction between the two, maybe by having an individual node "glow" on a node level runtime message, and keep the component color change for the component level runtime message.

I'm just thinking of different ways to make the messages more clear without having to click through different menus on the components.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service