mikakaraila / node-red-contrib-opcua

A Node-RED node to communicate OPC UA. Uses node-opcua library.
Other
208 stars 191 forks source link

Errors don't trigger Catch-Nodes #477

Closed Verschnupft closed 1 year ago

Verschnupft commented 1 year ago

Hello,

is there a specific reason, why the client-nodes are throwing errors by using node.error('text') instead of node.error('text', msg)? We would be able to directly work with the errors since catch-nodes are only triggerd by the second option.

From the documentation 114: If the error is one that a user of the node may want to handle for themselves, the function should be called with the original message (or an empty message if this is an Input node) as the second argument: node.error(“hit an error”, msg); This will trigger any Catch nodes present on the same tab. So calling node.error() with one argument will not trigger a Catch node.

(cp. https://discourse.nodered.org/t/node-error-not-caught-in-catch-node/1301/2).

mikakaraila commented 1 year ago

Implementation is originated 2015 or something... have to fix when I will have time.

mikakaraila commented 1 year ago

Forgot to fix this, have to do some more testing / cleanup and then I will commit and push new version.

mikakaraila commented 1 year ago

Please test with v0.2.295

I fixed selected placed that I found would be meaningful to catch. Other errors will still come as earlier. If you found that something should be added "catchable" please inform.

Verschnupft commented 1 year ago

thanks c: