Sometimes when I debug route I see exception in exchange, other times exception goes to CamelExceptionCaught property. What's the difference between them?
When the error handler handles the exception it moves the exception from exchange.getException to the exchange property. This is done so the error handler and Camel knows it has been handled. If the exchange is then continued routed and a new exception is thrown/set on the exchange, then the error handler is able to react again.
See this FAQ: http://camel.apache.org/why-is-the-exception-null-when-i-use-onexception.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With