camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ritterda <>
Subject Catch-All for (Sub-) Route Exception Handling
Date Fri, 15 Apr 2016 10:23:13 GMT

I am analyzing the exception handling capabilities of Apache Camel (v2.16.x)
and was wondering whether it is possible to propagate exceptions from a
subroute (B; e.g., "from:direct") to the calling route (A; e.g.,
"to:direct") without setting ".errorHandler(noErrorHandler())".

A: from(..).onException(IOException.class)...process().to(direct:subroute);


The noErrorHandler flag on a subroute level disables all error handlers
(e.g., global TransactionErrorHandler, DefaultErrorHandler). As a result the
exception is propagated to the calling route (A). As suggested in many
forums, this works fine, i.e., the exception is caught by the onException
clause for further processing. However, if error handlers are required, the
noErrorHandler cannot be set, which does not propagate the exception.

Do you know a way how to ensure the described behavior? Thank you in

Best Regards,
Daniel Ritter

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message