I know this may seem weird, but I can't think of an easier way to solve the problem.
I have some function
nodes which need things set in them for them to work.
If the variables aren't set, the nodes don't work. Not a big worry, but it is annoying remembering later that they aren't set and that's why it wasn't working.
What I am wanting to do is something like this:
var name = msg.payload.foo;
if (name *is undefined*)
{
error_message = "node configuration not set";
generate error();
}
I know it isn't syntactically correct, but I am sure you can get the idea.
This way my error trapping routines can catch the error and alert me of the problem, rather than having to set up an entirely new system to see that kind of thing.
My search on "how to create an error" was somewhat non productive - probably because I didn't word it correctly.
Thanks in advance.