Wish: ifError

Hi there!

What about an if-Error kind of component?
Something that identify if one component have an error or warning message and give an output. (0=ok 1=warning 2=error)

Thanks for your work!

IfError.gh (6.8 KB)

1 Like

Hi @benedettoasnaghi what exact problem are you trying to solve?

Hi @DavidRutten, thanks for the replay.

I often deal with survey data or other not consistent geometry/data type of information.
Sometime the possibility are so many that it would be unreasonable trying to foresee them all.

As consequence, I have components that give me warning or error, and in this cases I may need to re-route my workflow.

Hence, I like the idea that Errors can be used as decision trigger.

Just a thought.

Okay, I can definitely see some applications for an error boolean inside the file logic, but I do want to know exactly what problem it is solving and how you imagine your network will look/work with this feature.

Should data be wiped in some cases if there’s an error? Should some components be disabled? Should there be a visual cue? Etc.

Is this a more specific case of what I was thinking with my If switch component?
where you can input some if else condition in the cluster together with n numbers of inputs and outputs?

I was imaging something like this, where the output is 0, 1, 2 for each possible message type (0= good, 1= warning, 2= error, …)
And maybe even a secondary output with the actual message text if any.
I was imagine it as a component outside of my “normal flow”, like Timer or Galapagos.
In this way I can use something like “Steam Gate” or “Sift” or similar to change my flow.

I think the difference is the ability to read the component status/message.

Hope I answer your questions.

I support this, it has the potential to prevent cases where GH/Rhino can crash due to infinite loop.