Skip to main content

Handle Exception

Synopsis

This is a nested operator that is used for exception handling. This operator executes the operators in its

Try subprocess and returns its results if there is no error. If there is an error in the Try subprocess, the Catch subprocess is executed instead and its results are returned.

Description

The Handle Exception operator is a nested operator i.e. it has two subprocesses: Try and Catch. This operator first tries to execute the Try subprocess. If there is no error i.e. the execution is successful, then this operator returns the results of the Try subprocess. In case there is any error the process is not stopped. Instead, the Catch subprocess is executed and its results are delivered by this operator. The error message can be saved using the exception macro parameter. This Try/Catch concept is like the exception handling construct used in many programming languages. You need to have a basic understanding of macros if you want to save the error message using the exception macro. Please study the documentation of the <reference key="operator.extract_macro">Extract Macro</reference> operator for basic understanding of macros. For more information regarding subprocesses please study the <reference key="operator.subprocess">Subprocess</reference> operator. Please use this operator with care since it will also cover unexpected errors.

Input

in

This operator can have multiple inputs. When one input is connected, another in port becomes available which is ready to accept another input (if any). The order of inputs remains the same. The Object supplied at the first in port of this operator is available at the first in port of the nested chain (inside the subprocess). Do not forget to connect all inputs in the correct order. Make sure that you have connected the right number of ports at the subprocess level.

Output

out

This operator can have multiple out ports. When one output is connected, another out port becomes available which is ready to deliver another output (if any). The order of outputs remains the same. The Object delivered at the first out port of the subprocess is delivered at the first out port of the outer process. Don't forget to connect all outputs in the correct order. Make sure that you have connected the right number of ports at all levels of the chain.

Parameters

Exception macro

This parameter specifies the name of the macro which will store the error message (if any). This macro can be accessed by other operators by using '%{macro_name}' syntax.

Add details to log

Indicates if the stack trace and details of the handled exception should be also added to the log files in addition to a simple warning message.