Systems Variable for functionName?

Is there a systems variable with which to read the function name from which it was called? (in a function).. ?

I think that you need to explain more about what you are trying to achieve.

Ahhh, sorry,

want to create error trapping - want to send errors to a database, with some fields, like what was the incoming topic, messafge, error code, and from which function it came, want to sue same code in multiple functions, thus want a systems variable in the error trapping code that includes the function name it came from.

The catch node can give you some details in msg.error object.

I do this for logging to file by extracting what I need from the error object.

Have a look at the docs that tell what variables are defined in the Function node:

1 Like