camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Burkard <sburk...@gmail.com>
Subject Re: Exception propagation with onException + pipeline
Date Mon, 10 Mar 2014 13:17:28 GMT
Yes, if you define your onException globally. Currently you have defined it
locally just for the pipeline.

See section "Scopes" at http://camel.apache.org/error-handler.html

Stephan


On Thu, Mar 6, 2014 at 12:30 PM, Jose <jagaviles@gmail.com> wrote:

> Hi,
>
> I facing a problem catching exceptions when I use pipeline.
>
> I have a route like this:
>
> from("direct:x").pipeline("direct:y").process(processorA)
>
> The pipeline contains
> onException(MyException.class).handled(true).process(....)
>
> The problem is when an exception is thrown in "processorA". That exception
> is not being caught by the "onException" defined within the pipeline.
>
> I have tried to define "onException" as well on the calling route:
>
> onException(MyException.class).handled(true).process(...).
> from("direct:x").pipeline("direct:y").process(processorA)
>
> That way it works but I would like to avoid adding this on every route. I
> would like to define a global "onException" to handle both the exceptions
> thrown within the pipeline and outside the pipeline.
>
> Is there any way to do that?
>
> Thank you.
>
> Jose
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Exception-propagation-with-onException-pipeline-tp5748383.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message