Error node

Heyall

Is there a way to ‘throw an error’ (of kinds) in vvvv? I’m imagining a node called ‘Error (Debug)’ that simply turns red when the input us true. So ehen this happens in a subpatch, I can go in there and check what’s wrong, and I might have left a nice error message there as to what’s wrong.

I’ve been doing this simply with division by zero and rednode as errorhandling style, but that doesn’t seem like an elegant solution.

Additional, we could think about a ‘warning (debug)’ node, does the same thing but yellow and can be globally turned off - well just a thought…

a different thing but in the same direction is logger-(vvvv)

you could quickly do it with a plugin. just set the StatusCode of its INode interface to something like HasInvalidData

@woei oh yeah right. Or just throw an error - see attached!

DebugError.rar (10.6 kB)

@dominikKoller: sure, throwing an exception works. mind though, that the node will only stay red, as long as the exception is thrown. so either, you have to search for the a node which is not red anymore but threw an error you saw in tty or you go for finding the red node, but your tty gets flooded with errormessages until you find it. (which can be rendering the gui nearly unusable, in case there are a lot of errors)

@woei ah yes, flooding the TTY with errormessages probably isn’t the best idea. How do I access the INode interface of the plugin though?

Of course, through

[Import()](Import())
public IPluginHost2 FPluginHost;

now I throw the error only once, but the node stays red:

DebugError_02.rar (60.3 kB)