Do Catch

Table of Contents

Usage
Properties
Related topics

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

Usage

The Do Catch pattern specifies a series of steps to take when the specified exception is thrown. S The Do Catch pattern can only occur following a try pattern. It must be followed by either a processor or an endpoint.

Properties

Table 60, “Do Catch Properties” describes the properties you can specify using the properties editor.

Table 60. Do Catch Properties

NameDescription

Description

Specifies 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.

Exception

Specifies 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.

Language

Specifies the expression language used to process the expression.

Id

Specifies a unique identifier for the endpoint.

The tooling automatically generates an id for a node when it is created, but you can remove that id or replace it with your own. The Camel debugger requires all nodes with a breakpoint set to have a unique id.

You can use the id to refer to endpoints in your Camel XML file.

On When

Specifies an additional condition that should be true before the On Catch is triggered. This is used for fine grained controlling of whether thrown exception should be intercepted by this exception type or not.


Related topics