camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davide_cavestro <>
Subject Remapping exception from DSL
Date Wed, 12 Apr 2017 07:28:21 GMT
I need to remap exceptions under certain route portions, in such a way that
the obtained ones are handled by the custom errorHandler set at context
I'd like to do it from DSL for readability, avoiding to split routes into
too many sub-routes.

I've tried using /doTry///doCatch///throwException/ constructs, but the
/doCatch/ implementation uses a dedicated errorHandler, that in turns
delegates the handling of the thrown exception to a fallback that is not

In the following example /BarException/ is not handled by /myErrorHandler/.

*Question*: would it be worth providing a way to set the fallback error
handler at the /doCatch/ level?
i.e. write something like 
This ideally wouldn't imply supporting nested catches nor dealing with
exception loops.

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

View raw message