Table of Contents
Throws an exception
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
| Name | 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. |
| Specifies the class of the exception to create using the message. |
| 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. |
| Specifies the message to be used as a caused message when creating a new exception instance. |
| Specifies a reference to the Spring bean defining the exception to throw. |