Throw Exception

Table of Contents

Usage
Related topics

Throws an exception

Usage

The Throw Exception pattern instructs the route processor to throw an exception.

The Throw Exception pattern can appear anywhere in the route body. ==== Properties Table 72, “Throw Exception Properties” describes the properties you can specify using the properties editor.

Table 72. Throw Exception 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 Type

Specifies the class of the exception to create using the message.

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.

Message

Specifies the message to be used as a caused message when creating a new exception instance.

Ref

Specifies a reference to the Spring bean defining the exception to throw.


Related topics