Skip to main content

Handle Exception

Synopsis

这是一个嵌套的运营商used for exception handling. This operator executes the operators in its

Trysubprocess and returns its results if there is no error. If there is an error in theTrysubprocess, theCatchsubprocess is executed instead and its results are returned.

Description

The Handle Exception operator is a nested operator i.e. it has two subprocesses:TryandCatch. This operator first tries to execute theTrysubprocess. If there is no error i.e. the execution is successful, then this operator returns the results of theTrysubprocess. In case there is any error the process is not stopped. Instead, theCatchsubprocess is executed and its results are delivered by this operator. The error message can be saved using theexception macroparameter. 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 theexception macro. Please study the documentation of theExtract Macrooperator for basic understanding of macros. For more information regarding subprocesses please study theSubprocessoperator. 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, anotherinport becomes available which is ready to accept another input (if any). The order of inputs remains the same. The Object supplied at the firstinport of this operator is available at the firstinport 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 multipleoutports. When one output is connected, anotheroutport becomes available which is ready to deliver another output (if any). The order of outputs remains the same. The Object delivered at the firstoutport of the subprocess is delivered at the firstoutport 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

异常的宏

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.