Name

Catch — Catches exceptions as part of a try, catch, finally block

Usage

The Catch pattern specifies a series of steps to take when the specified exception is thrown.

The Catch pattern can only occur following a try pattern. It must be followed by either a processor or an endpoint.

Properties

Table 32 describes the properties you can specify using the properties editor.

Table 32. Catch Properties

NameDescription
HandledSpecifies an expression that determines if the exception is marked as handled. The expression returns a boolean. If the expression evaluates to any non-boolean value other than null it is evaluated as returning true.
languageSpecifies the expression language used to process the expression.
Inherit Error HandlerSpecifies whether the node should use the error handler configured for the route. The default is Disabled.
ExceptionsSpecifies the list of exceptions caught. The Add button adds an entry typed in the field. The Delete button removes the selected entry from the list.
IdSpecifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML configuration file.
DescriptionSpecifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.

Related topics

Expression and Predicates Languages
Configuring the route editor