Catch Errors (Var Ports)

This node forwards the input from the first port if the execution was successful. If execution on the top branch failed (and a matching try node was connected before the failing node!) then the input from the second port will be forwarded and the second variable outport will contain information about the observed error.
When the upstream branch fails, the following flow variables are pushed on the output:

  • FailingNode - the name of the failing node (or its enclosing component when a node inside a component fails).
  • FailingNodeMessage - the failure message as shown in the node monitor. For failures inside (nested) components this is shortened to the first level of nesting so the message stays compact.
  • FailingNodeDetails - detailed error information for the failing node and nested components. Can be exported as JSON when the Export details as JSON option is enabled. Use this variable when detailed error inspection is needed for logging or root-cause analysis.
  • FailingNodeStackTrace - the JVM stack trace of the underlying exception, if available.

Options

Always populate error variables
If selected, the variables will also be generated when the node is not failing with the default values as selected.
Default value for the 'FailingNode' variable, if no node is failing.
Default value for the 'FailingNodeMessage' variable, if no node is failing.
Default value for the 'FailingNodeDetails' variable, if no node is failing. Since this option was added in 5.4, existing nodes will be initialized with the default for the 'FailingNodeMessage' value.
Default value for the 'FailingNodeStackTrace' variable, if no node is failing.
Export details as JSON
If selected, the value of FailingNodeDetails is a JSON document with the hierarchical error tree (id, type, name, message, details, and children) instead of one text line per failing node. The flow variable type remains String. Useful when the failure details need to be processed programmatically.
Propagate variables
If selected, variables defined (or modified) within the Try-Catch block are propagated downstream of this Catch Errors node. In most cases users will want to check this box (which is also the default). Previous versions of KNIME did not have this option and variables were always limited in scope and not visible downstream.

Input Ports

Icon
The original input
Icon
The input to be used when execution on the main branch failed.

Output Ports

Icon
Original input or default if execution failed.
Icon
Reasons for Failure (if any).

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.