org.apache.camel.processor
Class ThrowExceptionProcessor
java.lang.Object
org.apache.camel.processor.ThrowExceptionProcessor
- All Implemented Interfaces:
- Processor, Traceable
public class ThrowExceptionProcessor
- extends Object
- implements Processor, Traceable
The processor which implements the ThrowException DSL
ThrowExceptionProcessor
public ThrowExceptionProcessor(Exception exception)
process
public void process(Exchange exchange)
throws Exception
- Set the exception in the exchange
- Specified by:
process
in interface Processor
- Parameters:
exchange
- the message exchange
- Throws:
Exception
- if an internal processing error has occurred.
getTraceLabel
public String getTraceLabel()
- Description copied from interface:
Traceable
- Gets the trace label used for logging when tracing is enabled.
The label should be short and precise.
- Specified by:
getTraceLabel
in interface Traceable
- Returns:
- the label
toString
public String toString()
- Overrides:
toString
in class Object
Apache CAMEL